I've been tooling around on my website and decided to try something a little new. I used to run WordPress, which uses MySQL as a back-end. This can cause problems — MySQL hogs resources like Gollum with a ring, and querying the database every time someone hits the site slows everything down. When my blog got the hug of death from Hacker News a few months ago, the amount of time and resources it took to serve the pages killed my server deader that corduroy.
About a week ago I read about Pelican, a Python tool that lets you write everything in Markdown and then generates static HTML output — no database, fewer server resources, and faster load times. Unfortunately this means you lose your blog's comments, but I realized the most conversation about any of my posts has never actually been on my blog. Nowadays all that discussion happens on social websites like Hubski or Reddit. Having your own comments section is all a little bit 90s.
mk helped me implement Discussion via Hubski on my website a while ago. This uses some JavaScript to make a query to Hubski every time someone views a post and embed the results. But I was itching to try something a little bit different. I wrote a plugin for Pelican (really just a very basic Python script) so that when you generate the website it queries Hubski for each post, scrapes the comments section, and then includes that in the static output. I get greater control over the output and I can style the Hubski comments consistently with the rest of my blog. The comments section won't update dynamically, but then after the initial flurry of comments they don't really change much anyway. It wouldn't be too hard to regenerate and deploy the site a day or a week after each new post so that visitors can see the latest from Hubski.
The new website is live as of today. It shouldn't look any different from how it used to, but the Hubski discussion should now be static and styled the same way as the rest of the site. I'm still tweaking how it looks (and lord knows there are probably some busted links), but what's there is basically working. I don't know if there's any demand for it, but if any other bloggers are using Pelican I'll gladly share the plugin I wrote.