It’s been a while since I last blogged. As usual, life gets in the way, but this time, I’ve been spending time rethinking and rebuilding the site. This is the third incarnation, and one that I finally completely love. But why rebuild again?
Remove Vendor Dependency
Funnily enough, it was an option in my Squarespace blog that started off this process! Squarespace provide the ability for you to write rich text fields in Markdown format. Whilst that’s a great idea, it made me wonder why I shouldn’t use the same approach for all blog posts…
That then struck a nerve: one of my biggest issues with software is vendor lock-in. To migrate my prior WordPress site to Squarespace, I exported the database to an XML format. Again, it’s great that WordPress provide that functionality, as do Squarespace and other blogging engines, but why not stick to one format? I had stumbled across Jekyll – the static site generator that powers Github Pages – before, and was able to quickly assemble a website with plain text files, without the need and overhead of a custom UI.
Although this site is currently generated using Jekyll, I could move to another static site generator with minimal overhead. The biggest change would likely be to front matter, which should be simple to replace/reformat with regular expressions.
Complete Version Control
Flat text files, rather than databases, are trivial to version control using Git. I can now easily browse the history of my entire site and changes to individual files. Markdown is incredibly easy to edit, and well-supported by cross-platform editors like Visual Studio Code and Sublime Text.
Customisation Without Overhead
The default site generated via Jekyll is simple to understand, and thanks to its great documentation, enables you to easily identify where and how to make the changes that you want. Those changes can be constantly built and previewed using the
jekyll serve command, so that you can quickly build up the content and customisation that will eventually set it apart from the standard template. Sure, WordPress boasts a community of thousands of plugins and themes, and the provided options from Squarespace are very polished, but ask yourself: do you actually need all the bells and whistles for a simple blog? Why bother with comments when people simply reply to your LinkedIn and Twitter shares?! Which brings me onto…
As the name suggests, static site generators produce static content: HTML pages. No server-side code means nothing for a server to interpret, meaning it can simply serve the raw page. Static content is easy to cache, optimise, and can be served by (surely?!) any major website hosting technology – such as Apache or IIS – meaning your hosting provider options are far less limited.
I have taken this one step further and optimised all the other assets – namely the stylesheets, scripts and images – and lazy-load where possible, meaning the site loads quickly and looks great on your mobile phone, tablet or desktop. Third-party asset includes are kept to a strict minimum, meaning you will be able to read the content without unnecessary delay, which is ultimately the purpose of a blog.
A Great Product Encourages Best Practices
I was completely sold on Jekyll within an hour of attempting to port my content to it. In fact, rather than import directly from WordPress, I decided to migrate the pages piecemeal, to review each one individually and ensure it was good enough. Mostly, this has involved replacing dead links and reworking images, rather than content changes, but I made many incremental improvements to the generator code, such as using Modular scale and lazySizes.
Finally, as a developer, this site is a constant representation of me online. I know that anyone across the globe on any device over any connection can at least browse its content with minimal delay. I am also happy for people to inspect the browser source code and HTTP headers, as it is carefully and optimally crafted. This is especially important, because I can confidently say that I practice what I preach, which along with great colleagues and a little luck, has helped my enjoy a great career thus far.
If you’re interested in more of my guiding principles and the other technology used to produce the site, please let me explain. Feedback is greatly appreciated as ever, and I hope you enjoy it!