« Oatmeal

Pandoc and the wicked simple build system

I recently added a /now page to my website. I set out to make it as easy as possible to update, and am pleased with the results!

Sitting in a folder in Dropbox on my computer is a directory, now. Within now are 2 files, index.html and index.markdown. Same content, different formats.

After I update the content of index.markdown I’m able to run a very tiny shell script, bound to the alias now, that does 2 things:

  1. It converts the markdown file to html using Pandoc and a simple template
  2. It uploads the newly minted index.html file to my server using scp

Who needs a CMS when you’ve got Pandoc? 🤷‍♂️

I considered simplifying” the build process even further by triggering the rebuild/upload process on file change, but decided that it wasn’t really worth the extra effort, and I like having to type $ now into the command line.

…granted, this does interfere with my use of Zeits now utility, doesn’t it? Welp! I’ll cross that bridge when I get to it, I guess 🌮