Computing stuff tied to the physical world

Preparing for a new weblog

Now that the WordPress-powered JeeLabs weblog has been replaced by a static set of pages, we need a way to continue adding new weblog posts and articles. The current approach is clearly an unsustainable “hack”: there’s still a copy of WP running the original weblog on a local VM, from which a new snapshot is tediously being created once a week.

Luckily, there are many dozens of static website generators to choose from these days.

One of them is Hugo, an open source project on GitHub – it’s in active development:

Hugo logo

It’s written in Go and it will run on just about any platform as stand-alone executable. Hugo is extremely fast (a few seconds to generate a 5000-page site), which is an important long-term consideration here (especially if the 1500+ older posts ever get imported), and it’s quite flexible, in terms of generating (paginated) lists, archives, tags, categories, etc.

There’s a nice development mode, whereby you run Hugo in live server mode, at which point it’ll auto-refresh the browser from its in-memory cache whenever any file changes. Very effective during development of the layout, but also when writing articles of course.

The question is: how do you switch to a new site with minimal disruption?

One solution would be a full conversion: extract all the existing pages, convert them, and re-publish them as part of the new site. But there are some problems with that: for one, the conversion might be tricky, lots of pages may need to be checked to make sure everything came across as expected. This places a heavy burden on getting the conversion just right.

The second problem is that URLs need to be kept intact – existing links should continue to work. This is not trivial, since WP’s auto-generation of a “slug” for each page is not necessarily identical to how Hugo does things. Again, lots of checks would be needed to verify that everything went well, i.e. accented characters and other non-ASCII-7 stuff.

The alternative is to accept the old and leave it for what it is, gently “folding in” the new, like you would with whipped cream in chocolate mousse :)

Which is exactly what is going to be done, starting 2016: all the old pages, except the top-level “index.html” will be kept as is, with the new weblog carefully generating pages which do not conflict with any of the old pages and URLs. The old (“classic”?) site will continue to supply all the existing posts and articles from 2008 through 2015.

The new site layout has been designed from scratch, and was made to look very similar:

Weblog wide

The nice JeeLabs banner and 3-post front page layout have been retained, as you can see. And the site has also been made “responsive”, adapting to today’s smaller mobile screens:

Weblog mobile   Weblog menu

With a collapsing menu at the top, and the banner size reduced to keep the site content in plain sight even on small mobile phones. Look ma, no JavaScript: it’s all HTML5 + CSS3!

(ehm, to be precise: there’s still a little bit of inline JavaScript for the collapsing top menu)

The recent posts and articles lists have been moved to a new “Archive” page, making the front page even quicker to load than before. All site searches are now delegated to Google.

As for the old site: again, it’s all still there. The old front page is going to be renamed to “index-wp.html” – it’ll be frozen to the final WordPress state on December 31st, 2015.

Enjoy the new site. May it serve us all well for many years to come!