New Site

2019-10-25 15:07 -0400

Welcome to my new and improved web site, using only the finest gluten-free electrons. I decided to rebuid my site using a Hakyll, a static site generator written in Haskell. I’ve migrated most of my important (and not-so-important) content over, but some content from the old site is missing, most notably my pictures. I decided not to migrate my pictures over yet because they were getting old – I haven’t uploaded new pictures in years. When I do put pictures online, it will probably end up on a separate site.

One side effect of the site change is that some URLs have changed. Notably, the RSS and Atom feeds have changed, as well as the links for filtering by tags. Currently, there are not RSS/Atom feeds that are filtered by tags. I may re-add that in the future.

While I was was re-working my site, I also took the chance to rework the CSS a bit. The same ugly colour is still there (I’m too lazy to figure out a new colour scheme), but the layout should be better. When I did the previous site, screens weren’t as large, or as small, as they can be now, and some CSS techniques weren’t available. The new CSS uses grids and should be usable on a variety of screen sizes.

Why the site change?

My previous site was managed using software that I wrote myself, which I started over 11 years ago. Back then, I basically had two goals: it would only use the filesystem to store content, and it would be extensible. I ended up with something that worked quite well, and I’m quite happy with how it ended up. It was used to host a few sites, including my brother’s web site and my wedding site. It handled a variety of types of content including blogs, microblogging, a wedding gift registry, and map data.

But it’s finally time to retire it and move to something new, for several reasons. I don’t have time to maintain it any more. It is written in Python 2, which will no longer be supported soon, and porting it to Python 3 will take some work. It also seems to have broken during a server migration; web servers seem to be inconsistent with handling a FastCGI application that’s backed by the filesystem, and even though I was using the same web server, something between the two systems was different enough that the site only showed the front page, no matter what page you tried to go to. The software seems to have recently developed a memory leak somehow, so it would eventually eat up half my swap space until I restarted it.

I opted to switch to a static site generator because, although it was fun to have my old site display a random quote and four random pictures on each page, I don’t really need dynamic content. A few previous iterations of my site ago, I was using a static site generator that I wrote based on, I believe, GNU m4. I decided that I wanted to try dynamic content (I think originally because I wanted to be able to easily fetch all the blog posts that I had written for a certain month or year). But I’ve realized that I don’t really need the dynamic content, and it’s much simpler to just host a bunch of static files.

I’ve also switched to hosting the site on Netlify. Previously, I was hosting it on a VPS and using CloudFlare as a CDN. It turned out that CloudFlare decided that most of my content wasn’t very cacheable, so it wasn’t saving much bandwidth. I could have tried fiddling with the caching settings, but of course, I don’t really want it to be serving content that’s too stale either. It’s hard to figure out how long I really wanted it cached. But with Netlify, I just send it my site whenever it changes and they cache the whole thing. I don’t need to worry them serving stale content, because I tell them when it’s changed.

Not running a Python server to serve by web site also means that I have more resources on my VPS for other things. I may start running a Matrix bot at some point. But more on that later…