Transforming Google Docs content into Jekyll-compatible Markdown

Hey everyone,

I’m trying to figure out how to convert my Google Docs into Markdown files for my Jekyll blog. My document includes several images and tables, and I’m not sure what the best approach is to preserve them.

I wondered if exporting to a PDF first and then converting that PDF to Markdown might work, but I’m concerned about losing formatting or media details. Has anyone tried this method, or is there a better solution? I’d be grateful for any advice or tips you can offer.

Thanks in advance for your help!

I’ve found that using Pandoc is a reliable method for converting Google Docs to Markdown. First, export your Google Doc as a .docx file, then use Pandoc to convert it to Markdown. It handles images and tables quite well, though you may need to adjust some paths. The command would be something like ‘pandoc -f docx -t markdown input.docx -o output.md’. You might need to fine-tune the output, but it’s generally cleaner than other methods I’ve tried. Just ensure you have Pandoc installed on your system before attempting this approach.

hey SwimmingShark, i’ve had success using the Docs to Markdown add-on for Google Docs. it handles images and tables pretty well. just install it, run it in your doc, and copy the generated markdown. might need some tweaking but it’s a good starting point. good luck with ur blog!

I’ve grappled with this issue before, and I can tell you that exporting to PDF first isn’t the best route. It often messes up the formatting and makes images a nightmare to deal with. What worked for me was using a combination of tools. I started with the Docs to Markdown add-on, as mentioned earlier, but found it didn’t always capture everything perfectly. So I developed a workflow where I’d use that as a base, then manually clean up any quirks.

For images, I ended up downloading them separately and adjusting the markdown to point to the correct locations. Tables were trickier - sometimes I had to recreate them manually in markdown syntax. It’s a bit of work, but the results were much better than any automated solution I tried. The key is to be prepared for some manual intervention, regardless of the method you choose. It takes time, but it’s worth it for a clean, well-formatted blog post.