Convert Google Docs to Jekyll Markdown

May 2018 Update

The script originally suggested in this answer appears to no longer work and has not been updated for 5 years.

An alternative solution (which is based on the old script) can be found at https://github.com/evbacher/gd2md-html

I tried it out, it works pretty well.

Previous Answer

You can use a Google Script to do the conversion for you!

This one will let you convert to .md and it will email you the converted file. I've tested it and works fine. It works with basic tables, and if you have images in the doc, it will attach them to the email.

Instructions for installing are on the same link, in the GitHub description, but I pasted it here for ease of access:

Add the script:

  • Open your Google Drive document (http://drive.google.com)
  • Tools -> Script Manager > New
  • Select "Blank Project", then paste this code in and save.
  • Clear the myFunction() default empty function and paste the contents of converttomarkdown.gapps into the code editor
  • File -> Save

Run the script:

  • Tools > Script Manager
  • Select "ConvertToMarkdown" function.
  • Click Run button (First run will require you to authorize it. Authorize and run again)
  • Converted doc with images attached will be emailed to you. Subject will be "[MARKDOWN_MAKER]...".

Good luck!


You can export as HTML. Jekyll can serve static HTML files.

Btw, "standard" markdown doesn't have tables. There are implementation that have it, but I'm afraid you'll have to convert them by hand to the right format, which will be implementation dependent. I don't know about Jekyll, maybe it's easiest to just use HTML tables within the markdown text.

You could create a new theme based on the HTML export. The export should contain the stylesheet embedded in a <style> tag within the HTML document. It's not really easy to create new themes, but doable. Or, if you just want the content and don't mind using whatever Jekyll theme you already have, then you can cut out the stylesheet part and keep the html only.