And We're Back!
The blog's been down for awhile due to a few changes. I've moved servers, and switched blog technologies to something a bit friendlier for both my server and browsers. I was previously using Ghost as a self-hosted solution, but after the latest version failed to work on my Arch install I decided to take the opportunity to look into static site generators.
Static site generators are fantastic. They simply generate a set of static pages that can be served very effeciently by any web server, reducing server load and resulting in quicker page load times. The popular one at the moment seems to be Jekyll, but that's a bit overkill for what I want, and honestly I didn't particularly feel like using another Ruby or Node tool. Instead, I did what any insane person would do, and wrote my own system in straight Bash.
I use Pandoc to generate HTML from my markdown, and just have bash files full of text for my templates. CSS is embedded directly in the HTML to reduce HTTP requests while loading the page, so that the blog is optimized for first-visits. However, I've also tried to limit how much CSS I use so that it doesn't slow down browsing the rest of the site. Even my largest post at the time of writing is only 5.5KB gzipped.
Pandoc also takes care of adding syntax highlighting CSS classes for me. As of writing this I haven't added any rules to actually apply highlighting, but I may do that in the future.
The result of all this is an effecient static site generator, depending only on Pandoc and standard POSIX utilities, and coming in at just over 8KB excluding actual post content. Not bad!