About this site

See below for a full explanation of the how and why of techncial aspects of this site. The short version is:

Now for the longer explanation:

Style and layout

As my previous version of tolberts.net was looking pretty dated, I decided it was time to give it something a little more modern. And since I have no sense of design, I decided to do what every other techy in the world is doing nowadays (2013) when wanting a simple but modern looking website: use Twitter Bootstrap.

I didn't really spend any time at all customizing it. I took the carousel example from their demos, and called it good. Other pages had the carousel removed and thus had to have some minor changes to make them work without it, but not much.

Backend and generation

Because there's really no dynamically generated content (anymore, now that we've stopped posting on our blog), the site is all static html. But to avoid all the manual copying and pasting of the theme header/footer stuff, I write the content of the pages in separate files, then have a build system that builds the site from my templates plus content files.

There are various tools out there for doing just that (such as Pelican), but none would do exactly what I wanted, so I ended up rolling my own. The reason they didn't do what I needed was because of my old blog. I started our old blog when our free web host provided php but no database. So it saved all the content in a file. One giant file, with text delimeters for separating posts, and specially formatted text tags indicating the dates, titles, etc. So no matter what tool I decided to use to generate the static content for this iteration of the site, I was going to have to parse that giant file of content to build it.

So I debated a few methods of scripting the "build" of the site. Perl. PHP. Python. Gradle and Groovy. But I kept coming back to the fact that Make (and Makefiles) still have the best model for tracking dependencies and only building things when their sources have changed. So, despite the horrible syntax of Make, I decided to do it all in a Makefile. Which meant I didn't want to get another language involved, since I wanted the entire build system to live in a single file. So my Makefile just calls standard Unix string manipulation commands to build everything. Which is pretty simple for most of the site, but NASTY NASTY NASTY for the blog. Trying to parse the giant blog content file, divide it into posts, parse out the title and dates and content, build an index of all the posts, create the links between them, and so forth, involves way more shell-foo than I'm used it. It was quite the learning experience, and, in the end, quite the abuse of sed. But it works.

Hosting

So as much as I move things around looking for free decent hosting, this will probably be outdated soon, but as of 2013, I'm hosting this using Redhat's Openshift cloud platform. It's pretty great -- you can run just about any sort of web server/web app platform, and for sites with low-enough traffic, it's completely free. And they have great command-line tools for managing your webapps, which is prety awesome. I highly recommend it.