Blogs
Written Nov 13, 2022, tagged under post
My original plan for today was to describe in some detail how I set this blog up - it was pretty easy, and free. However time is short, so I think this is going to be more of a "part 1", describing the context and giving a few initial pointers, before following up tomorrow/soon with the full, gory detail.
So - blogs. Going back quite a few years now, I came across WordPress. It was a great blogging platform, that was also really good for building general websites. I built a couple of work sites, and still actually have an old WordPress blog kicking around somewhere (I'll find the link when I have a moment). However, since those days WordPress has changed quite a lot.
It used to be simple: you'd install it, pick a theme and then write pages and they'd get output. More recently, though, they've added the kitchen sink, and now whenever I use it I find myself having to deal with new editors, and loads of things I don't really care about.
It has also slightly become a victim of its own popularity. Since it powers so many websites, it has become a target for a lot of hackers, on the look out for code vulnerabilities that will allow them to abuse the site in different ways. Hackers and SEO optimisers are also keen to get comments on your site to point to their scams, and if you run it yourself then you spend more and more time dealing with hacking attempts over the internet.
Add in a few practical concerns such as how to make changes to a site while keeping the existing site running in its old form, and I'm left looking for other options. And I found one, in the form known as "static site generators".
The concept of static site generators is simple:
- You have your blog posts, saved as local files in folders
- You run a piece of software, which takes those files and some configuration and turns it into a fully-formed website
- You put that website somewhere people can access
There are loads of benefits. Sites are really quick, as there's no work required when you serve pages. It's un-hackable, since there isn't any code running - it's just HTML files. So you don't need to keep patching your site, get databases running etc. Finally, you can easily work on it locally (as I am now, typing into a local text file), then publish it when you are happy with how it looks.
This is the approach I am using for this site, using a static site generator called Jekyll. And I use a service called Netlify to pull everything together. As currently set up, my blog posts and configuration files are stored for me in a repository run by GitLab. Then, Netlify are connected to that, so that when I make changes they run the process of generating the site, and serve it for me.
That's it for now - I'm out of time. Tomorrow I'll fill you in on more of the details:
- Jekyll and themes
- Connecting Netlify to GitLab
- Basic web statistics
And did I mention it is all completely free?
Photo by Tom Hermans on Unsplash