Niall’s virtual diary archives – Tuesday 10th May 2016

by . Last updated .

Tuesday 10th May 2016: 7.43am. Link shared:

Last weekend didn't see much sleep as I spent the early hours learning bleeding edge technology to create the replacement website which fronts my consulting business. I had taken down the previous site last March or so mainly because keeping the Plone CMS backing it up to date was becoming bothersome, so I was looking for an absolutely zero maintenance overhead website solution.

That ruled anything like Wordpress or anything with a database - by zero maintenance, there could be no alternative to a static HTML website, but equally I really couldn't be arsed writing out HTML by hand as if back in the 1990s. I was really looking for something like, my personal website, which started life in 1997 as a static website with Server Side Includes (which were the original easy way of getting the server to autogenerate HTML pages for you). Before the 90s were out I converted it over to use Microsoft FrontPage with its FrontPage server extensions, and from that in the 2000s into Microsoft Expression Web which was sufficiently backwards compatible with FrontPage to work. Sometime in the 2010s I got annoyed by having to manually generate post archives and move files around as Expression Web likes to corrupt your files, so I wrote a bit of PHP to automatically scan all the HTML files and build a single XHTML file containing everything, then more PHP to load that XHTML file per page render and write out the appropriate section - so effectively a XHTML database driven website. That way I could simply fire HTML pages into a directory and let the PHP do all the index building and filing for me. It was a small step from there to writing some Python to query Google+ for posts, and write those into HTML files to get picked up by the PHP scanner. And another bit of Python to check every XHTML file for correctness and to compare them against a copy in a git repo to catch when Expression Web silently corrupts your files. And voila, became automated and maintenance free.

Unfortunately that's very much a bespoke solution for that specific website and it would be work to replicate that into a new website, plus Expression Web was abandoned by Microsoft in 2012. So for the rebuild I did some Googling and discovered that was way ahead of its time in having a generator stamp out a static website from a git repo for you. There are in fact a myriad of bleeding edge new solutions all of which reflect the fact people are getting rapidly turned off Wordpress et al with its never ending maintenance overheads and for simple websites a static website generator is all you need. These new solutions are funny beasts, they are very tightly integrated with programmer's source control (invariably git) and content is no longer written in HTML, but in Markdown. WYSIWYG editing isn't even attempted, rather an automatically refreshing live website is launched on your local machine, and every time you hit Save in a Markdown file your view automatically updates. When you want to publish, you simply git commit and push and you're done (especially if you're hosting your website on github).

If this sounds like a "programmer's Wordpress" it's not a bad description: various technologies traditionally only used by programmers have been tied together into a new convenient and powerful way of implementing websites. Github originally provided github pages for software projects to mount websites for documentation etc as a bit of an afterthought, but now there is an exponentially growing userbase of github who solely use github for website hosting alone. Crazy.

A quite handy in depth review of the top ten static website generators can be found at, and after a bit of deliberation I ended up choosing Hugo ( mainly because it's fast and portable and it's a single executable binary for all platforms, so no messing around with installing nor config etc. Hugo lets you install any of a large number of themes, and you customise your website from that base. Certain subdirectories in the directory hierarchy have special meanings, so content/post/* gets converted into a blog with tags, sections, archive etc and so on.

I also converted over the python script and my automatically generated CV from for, so every hour Google+ is fetched and any new posts converted into Markdown files in the blog posts folder, the central git repo is updated with the changes and Hugo invoked to refresh the website. If I ever wanted to add a page or other new content, I simply pull any changes from the git repo, add a page, push the repo changes back and it'll get refreshed publicly on the next hour. It would be trivially simply to make pushes update live via git hooks, but I don't expect to update the site much except by Google+.

"Website as a git repo" is as convenient as maintaining software via git. And it has zero maintenance. If you've had hassle from Wordpress getting viruses etc, consider using a static website generator.

Go back to the archive index Go back to the latest entries

Contact the webmaster: Niall Douglas @ webmaster2<at symbol> (Last updated: 2016-05-10 07:43:08 +0000 UTC)