Static Blog Generator (What's Old Is New)
by Seni Sangrujee on December 11, 2010When it came time to put up our blog, I had a tough time deciding what software to use. I've been using WordPress for several sites for a while, but it's been feeling bloated and cumbersome. It feels like it no longer facilitates writing, but has become more of an chore or an obstacle.
There's a trend going on to move toward using Static Blog Engines to generate blogs consisting of pure html pages which I think is great. Comments can now be handled offsite using services like DISQUS or Echo (note to self: I need to add here soon). Searching your blog can be offloaded to Google Site Search.
I've been using various blog engines in the past including Movable Type, Blojsom, WordPress, and even a home-brewed solution, but after all these years it's refreshing to have a pure html blog. Some of those solutions had options to generate html, but they seemed lacking.
Benefits of Static Blog GenerationThere are several reason I like this idea, some of which may only by important to me:
1. I love the speed when visiting a pure html blog. Sure you can use WP-Cache, WP Super Cache, and WP-SuperCache-Plus to make a Wordpress blog fly, but for the clean, simple blogs I lean toward, a database seems like overkill.
2. I hate installing patches and keeping up with security updates.
3. I'd love to write, edit, and publish using my own editor and a command line, where I spend most of my day anyway.
4. Fewer worries about overloading the server.
5. Focus on writing not site administration.
This post, Blogging Like a Hacker, sums up this feeling the best.
Static Blog OptionsThere are a lot of choices out there in many languages. This isn't a tough app to write and minimalism is often better, so many people have made their own and put them out there.
Here are some I looked at:
Unix Shell Scripts
Yet Another Static Blog Generator
Using Wget to Create a Static BlogOut of the options above, NanoBlogger came the closest to what I was looking for. But there's a bit of a learning curve involved, and I'm not sure others here would want to write blog posts that way.
So my solution was to run an old-school database-backed blog (a home-brewed blog engine I wrote years ago) on our staging server and create a script to use wget -r to recursively fetch the site into static html files and publish them to the production server. Interestingly, I first tried using curl which is included in MacOs, but it doesn't seem to have a recursive option.