Meta-Blogging #1
Tuesday, August 07, 2012
In the days of HAM radio, the most common topic of conversation over the air was of course HAM radio. I don’t want this blog to be all about blogging, but part of the fun – part of the reason that this is a homebrew blog on my own server and not another spot on blogger – is getting to play with the technology that makes this all run. In that spirit, this is the first of a planned series about what makes this blog tick. Warning: technical stuff coming up.
Yesterday I got two features working that I really missed from my old platform. Automatic deployment and delayed posting. Jekyll was designed by the amazing folks at GitHub to run and deploy with Git. I have set up git so that every time I push to the server the blog will go live on the site without having to touch the server. This is my first try at Git’s commit hooks, and they turn out to be easier then I though. Just drop a shell script into the hooks
folder with the appropriate name and off you go. I also set up cron
so that delayed posts will be built and pushed to the live site at around midnight PDT.
The tricky part is writing a good shell script. Both git
and cron
use the same script to do the same thing: check out the latest version into a working directory, build the site, and copy the result to the live folder. At the moment, the script is rather fragile, but it works. It is easy to write scripts you watch as they run. If something goes wrong, you are right there to fix it. This program on the other hand will run when I am not there to check the results. If something goes wrong my blog would go down and I might not even know it. It feels a bit like landing a rover on mars, only with less publicity and lacking 2.5 billion dollar price tag.
Still on the todo list
: comments, Atom/RSS feeds, statistical analysis of log data, and some custom extensions to Markdown.