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 are 2 files,
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:
- It converts the markdown file to html using Pandoc and a simple template
It uploads the newly minted
index.htmlfile to my server using
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 Zeit’s
now utility, doesn’t it? Welp! I’ll cross that bridge when I get to it, I guess 🌮