Software Used To Build This Blog

Previous Versions

At the outset of this project, I had decided that I wanted to create my own software for this blog. Although there are plenty of excellent content management systems (CMSs) out there, I thought that the majority of full-blown CMSs were overkill for the type of blog I had in mind. Also I wanted to have something that would be efficient with server resources.

My first iteration of this project was as a single page application (SPA) using the excellent Vue.js framework. Content was created and served by means of the DatoCMS headless content management system.

I have to confess that DatoCMS is the only headless CMS that I have used, but it seems to work very well, and is more than sufficient for the purposes of this blog. Their online documentation is for the most part clear and sufficient, and the one time I had a problem with which I needed assistance, a representative from DatoCMS contacted me within a very reasonable time, even though I had already managed to answer my own question. Not bad given that my usage of their service falls well within their "forever free" plan!

Although it was a pleasure to work with Vue.js, I was not entirely happy with the idea that the site would only be accessible if javascript were enabled. Another source of disquiet for me was the on-going discussion as to how well SPAs are indexed by the search engines.

At this point I started to consider the notion of pre-generating the site into a number of static HTML pages for upload to the server. Nuxt.js seemed like the obvious choice, as I was already using Vue.js. However, there seemed to be no clear migration path from "vanilla" Vue.js to Nuxt.js. And so I started to look around for other site generation software.

I started reading about Nikola. Nikola seemed to do everything I wanted, and more. However, one line in the Nikola GitHub repository readme file got me thinking: "Small codebase (programmers can understand all of Nikola core in a day)". If Nikola, with all its features and customizations, could be understood in a day, then why not write my own minimalist website generator?

Current Version

And so I decided to write the code to generate static HTML pages on my local computer for subsequent upload to the server. Content would be produced and downloaded from DatoCMS as before.

The program to generate the website is written in Python, and turned out to be surprisingly straightforward. The source file is currently less than 240 lines of code, including plenty of vertical whitespace. It has to be said, though, that this is a pretty minimal implementation, but is a solid base on which more features and functionality can be added in the future.

As far as the templating engine goes, I opted for Wheezy. Although I had previous experience of Jinja and Mako, I was attracted by the simplicity of Wheezy, and have not yet had any cause to regret or re-evaluate this decision.

The program is run within a Docker container.

At present, it takes less than 5 seconds to generate the entire site, and that includes starting up and tearing the docker container. 

Future Development

Both the Python code and the Wheezy template could benefit from some refactoring in the future.

The next major feature to add is a comment section for each of the posts, but for now I feel I need to concentrate on creating more content. 

Categories:


Some Other Things...

... such as

  • Advertising banners for affiliate marketing
  • Lists of recent and related content
  • Links to other sites