I've been meaning to write a post on how I maintain this blog, and prompted by this request, I've finally made time to do it.
I use a static site generator called Pelican. This entails me writing my blog posts as plain old text files, formatted using markdown, and then Pelican takes these files and produces a ready-made website in the form of HTML files, CSS files, images, and indeed any other type of file, such as audio or video, that I'd like to include. This heap of files can then be uploaded on to almost any web-server. There are no requirements that the web server uses php or ruby or any kind of database.
As a matter of personal preference, I stick mainly to writing text, and use other media only when I feel it makes sense, which is generally far less often than for most people. Pelican fits well with this, and also offers a kind of simplicity that appeals to me. Don't confuse that with being simple to use: a pencil may be simple, but using it to draw is not. I consider Pelican to be simple because it doesn't have a GUI (graphic user interface) to distract me from the complex business of stringing words together.
Pelican is Free and Open Source software and is released under the GNU AGPL v3. This means you are free to read, modify and redistribute the python source code. This means that, if I so choose, and sometimes I do, I am able to understand how it is processing my files and constructing my website. Although some knowledge and time needs to be invested in understanding Pelican, the reward is that I have huge freedom to control how my blog behaves and feels.
To customise my blog I have created a theme called ajc2, which you can find and fork on github. (My initial attempt - ajc - was a failure!) A theme is a fairly simple thing. It contains a few HTML template files, one for each type of page in my blog. For example, there's a template for a blog post, like this page, and another for the index page. There is also a CSS stylesheet that tells the browser what fonts to use, and what colour to use for the background, and so on. Various icons are also stored within the theme, such as the RSS and twitter icons on the index page.
Managing the content
The content of the blog is absolutely the most important thing to me, and so I keep it backed up and version-controlled using owncloud. owncloud is a web application that you can run on your own webserver to provide your own cloud services, hence the name. It can do a number of things, but primarily I use it to store my files and make them available from any device that I own (laptop, phone and tablet) and indeed from any web browser. In addition to this it also saves versions of the files, so that if I mess up a file beyond the ability of my text editor's undo button, owncloud can offer up a number of previous versions of the file.
Simple, but not too simple
As I said, Pelican is simple, and in almost every way this suits me. But there are a few drawbacks. The biggest one is that it doesn't allow comments by default. This didn't bother me at first because when my blog was on blogger I didn't get that many comments. That was not blogger's fault - my blog was young back then and I had no presence on social media. More folk are reading my blog these days, and I think they might leave interesting comments (appreciative or critical) if they could. This was brought home to me during the Scottish referendum when my blog posts were being shared on facebook (I don't use facebook). I hadn't really appreciated what was going until one night I sat down in a local pub and the person next to me said they'd liked my blog post and it had helped make up their partner's mind on how to vote!
Anyway, please accept my apologies for not having comments on this blog as yet, and rest assured it is high on my list of things to do.
A wee sneak peak
Want to take a peak over my shoulder whilst I'm working on my blog? OK, you've twisted my arm, I'll include just one image in this post, and you can click to enlarge it if you like: