Post Google-Docs To GitHub-Pages with Gabriel (The Markdown Angel).
This is a simple Google Apps 'Add-On' which converts a Google Doc to a text based format called Markdown. It adds a little metadata (in YAML format) about the document (e.g. a title, author, categories/tags) and commits it (together with any associated images) to a Github Repository (repo).
It is aimed at users who have a Jekyll blog or static site that is hosted using Github Pages, but who are not especially familiar with the Markdown format, or the technicalities of GitHub 'commits'. Jekyll (see the links below for more information) is a static site generator, transforming Markdown into a fully feature blog or article-driven website. You can host these for free using Github. What Gabriel does is allow you to transform your Google Docs into this Markdown format, and publish in one easy step (and straight from Google Apps).
Gabriel essentially lets you use Google Docs as a simple content authoring system for your blog. Ordinarily, you would author blog posts (in Markdown) on your local computer (then use the Github Command Line Interface or GUI Application to push them to Github) or on the Github website directly (which won't allow you to save your draft whilst working on it). With Gabriel, you can author each post as a document in Google Docs, including tables, links, headers and images. When you're ready to publish it, simply 'save' it to Github and all the technicalities of conversion and publishing are taken care of. If you need to update the post in the future, you can simply make any content change you wish and re-save it, updating the published versions.
It allows for simple permalinks, tagging and titles. You can also submit arbitary YAML if you're doing custom things in Jekyll. All Gabriel related metadata is stored in the DocumentProperties of the document, making it ideal for collaboration (e.g. the settings for each document follow each document, rather than the user).
You can also publish to simultaneous blogs/repos at the same time, making cross-posting much faster and easier.
To use this add-on, you'll need to have a Github account already set up, and ideally your Jekyll-based blog already set up and running (although this is a recommendation, not a requirement). To set up an account, just visit 'https://github.com' and sign up. Once you've done this, the first time you run this add-on, you'll need to authorise it to talk to Github on your behalf. This involves clicking on the link that will appear in the side bar and following the on-screen instructions (Github will ask you to grant 'Gabriel - The Markdown Angel' access to your repositories and to author files within them). If you grant this (which you will need to do for the add-on to work) then you will have to close and re-open the sidebar. Once this is done, you'll be ready to go!
You can download the code yourself (download links above, or fork from the repository) for modification/testing/usage/debugging or grab it from the Google Web Store. Please note that this code is currently in late-alpha/early-beta. It's functional but a little rough around the edges (especially in handling the OAuth flow to Github).
Gabriel, 'The Markdown Angel' to make generating a publishing Markdown easier for non-technical or non-confident users. Named with a nod to Jekyll & Hyde as it is mainly used in conjunction with a Jekyll / Github-Pages repository on Github.
It is licensed under version 2.0 of the Apache License and contains code (thanks!) from the following projects (any alterations or modifications are marked in the code):
|OAuth2.gs||Github Repo||Copyright 2014 Google Inc. All Rights Reserved.||Apache License, Version 2.0|
|Markdown.gs||Github Repo||Copyright 2013 Google Inc. All Rights Reserved.||Apache License, Version 2.0|
|Underscore||Website||Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors||MIT License|
|js-yaml.min.gs||Github Repo||Copyright (C) 2011-2015 by Vitaly Puzrin||MIT License|
The logo incorporates the Markdown Mark which is licensed under the Creative Commons License (CC0 UNIVERSAL PUBLIC DOMAIN DEDICATION LICENSE).
All else, Copyright JD, 2015.