Remake of this website and the generator script

I have just recently uploaded a new version of this website, generated using a custom-built Ruby script. This is just a meta post about it. Visitors should not experience much difference.

I used to use a complex org-publish setup to generate and publish this website, along with Emacs Lisp functions to sanitise and upload files, fetch and process logs for analytics and do some other related tasks. The website was made up of a bunch of org-mode files, one for each page. Making a new page or blog post required too much manual work and copying things around, so I didn’t make much. Also, org-publish was slow, even when only a single file was modified.

Sooo, given in the past two days where I had no lessons, I converted the pages to Textile from Org mode using pandoc, and wrote a program in Ruby that, using also RedCloth, generates all the pages, RSS feeds and blog pages (one single blog ATM, but I’ve tried to make it easy to spawn blogs because I may start side-blogs, so-to-speak) and copies over those and the static files into an output directory. Having only very superficially perused Ruby in the past, it took a bit of time to get used to the language, but that was worth it. I’ll probably be a ‘Rubyist’ from now on, I guess.

Textile is simply the most expressive markup language after Org’s one out there. Markdown, in all its variations, is limited, and languages like reStructuredText or AsciiDoc are comprehensive with regards to features, but unfortunately cryptic for my tastes. Textile being more explicit with its markup (and for my personal taste, more elegant than any of the three formats named), it’s easier to look up documentation for all the constructs. Given I’d preferably only know Org syntax by heart and rather not have to memorise yet another markup syntax, that is very useful to me, considering also I only occasionally post (though, I’m trying to make creating new posts as easy as it gets with this current setup, so hopefully I’ll publish more often).

The new setup is basically ~400 lines of Ruby, a simple Makefile that’s used as a command dispatcher (i.e. make publish runs, make build runs ruby build.rb, etc.), and some tiny shell scripts that help generating pages/posts and publish the website. I keep using Webalizer for log-file analysis. It’s not all that featurefull, but I don’t really even need it, just look at reports for fun, so no trouble. I’ll probably publish this setup soon somewhere, after fiddling with it a bit more. My takeaway from this adventure was though that each and every programmer should at least attempt writing their own scripts for this task, given how easy essentially is (I spent most of the two days for figuring out how to use Ruby’s offline documentation with least friction possible), and yet how fun and interesting it might be. This was my first serious foray into Ruby, and that alone was quite nice in itself to be honest.

I have moved blog articles under their own subtree, but wrote an htaccess file to redirect from old paths to new ones, so all bookmarks or feeds should work without modification. gk.html is removed, I’ll set up a redirect to the relevant file in my configuration repo on GitHub (link) soon, if htaccess will allow me to do that. Maintaining that file was problematic anyways, it was never up-to-date. Also, currently the sitemap is missing too, but hopefully I’ll write the code to generate it soon.

So, this is it. Not that useful of a blog post this one probably, but nice that I made this recap. This post should function as a “colophon” page here. If so, I should not conclude without mentioning GNU Emacs and Org Mode, which make using a computer a fruitful task for me.