About Archive Tags RSS Feed


A blog overhaul

8 October 2019 18:00

When this post becomes public I'll have successfully redeployed my blog!

My blog originally started in 2005 as a Wordpress installation, at some point I used Mephisto, and then I wrote my own solution.

My project was pretty cool; I'd parse a directory of text-files, one file for each post, and insert them into an SQLite database. From there I'd initiate a series of plugins, each one to generate something specific:

  • One plugin would output an archive page.
  • Another would generate a tag cloud.
  • Yet another would generate the actual search-results for a particular month/year, or tag-name.

All in all the solution was flexible and it wasn't too slow because finding posts via the SQLite database was pretty good.

Anyway I've come to realize that freedom and architecture was overkill. I don't need to do fancy presentation, I don't need a loosely-coupled set of plugins.

So now I have a simpler solution which uses my existing template, uses my existing posts - with only a few cleanups - and generates the site from scratch, including all the comments, in less than 2 seconds.

After running make clean a complete rebuild via make upload (which deploys the generated site to the remote host via rsync) takes 6 seconds.

I've lost the ability to be flexible in some areas, but I've gained all the speed. The old project took somewhere between 20-60 seconds to build, depending on what had changed.

In terms of simplifying my life I've dropped the remote installation of a site-search which means I can now host this site on a static site with only a single handler to receive any post-comments. (I was 50/50 on keeping comments. I didn't want to lose those I'd already received, and I do often find valuable and interesting contributions from readers, but being 100% static had its appeal too. I guess they stay for the next few years!)



Comments on this entry

icon gregoa at 21:07 on 8 October 2019

you seem to have an off-by-one error in the month of at least this posting unless your timezone is month in the future :)

icon Steve Kemp at 03:36 on 9 October 2019

That's embarassing, you're right!

I'll fix it this evening.

icon Andreas Schamanek at 08:57 on 9 October 2019

I use pandoc, so I am in a remotely similar boat. As such, I miss site-search, and I am still looking for a simple solution that does not outsource to 3rd parties. In my case it could even rely on PHP.

icon Jonathan at 15:30 on 10 October 2019

So it's a new home-grown solution?

(I'm very slowly migrating from ikiwiki to hakyll, possibly.)

icon Steve Kemp at 16:51 on 10 October 2019

Yes, this is basically a rewrite of the existing chronicle-project - but stripping out all the flexibility.

So it doesn't use plugins, doesn't have theme-support, it just comes with embedded text/template files which match the theme I used in the past.

I will document it, and I will share it, but I don't think we need to promote it particularly there are enough of them out there.

Half my goal was to experiment with rewriting Perl's Text::Template module in golang, but I got distracted and didn't go very far down that route. I think it would be a worthwhile project, which would ease porting of my other projects to go, but the overhead probably means rewriting the templates is perhaps simpler..