23 sept. 2016

How do I blog? - Blogger posts from markdown and CLI

There are plans to migrate Silly Bytes to Hakyll and GitHub pages, but till then I'm still using Blogger and I wanted to make the posting process as painless and automatic as possible.

Every post I write is currently a separate git repo hosted on the Silly Bytes GitHub organization. The post is written and maintained in Markdown using Pandoc and a convenient Makefile generated by the made script.


Writing posts in Markdown is nice but is not very useful if you still have to mess around with Blogger's web interface, so here is the plan:
  • Write post in Markdown
  • Use made to generate a Makefile
  • Generate HTML from the Makefile post $ make
  • Push the HTML post to Blogger using Google APIs

The first 3 steps are already covered so lets dig into the Blogger negotiation part.