A Perl-Based Static Site and Gemini Capsule Generator: The Story of tuxmachines.org and techrights.org
Rolling out our own, as more people and sites should, to make a new and secure system that just sends static pages
THIS site has changed a lot over the past couple of years. Drupal was turned into static pages after many years of accumulating Drupal "nodes" (pages) and we then started developing a static site generator, which was deployed to another site once it had matured sufficiently, with bugs ironed out. Earlier this month we added bulletins on top of that, so tuxmachines.org continues to improve. At some point we'll also enhance our Gemini capsule some more.
But first, let's look back at some context and an essential backstory, justifying the necessity of the transition.
Problem
Drupal was getting old and not reliable. DDoS attacks were not too hard to carry out. WordPress wasn't much better, but it compensated by having lots of RAM and CPU capacity. It wasn't cost-efficient, as a lot of traffic came from bots, but at least everything stayed glued together and generally worked. Most of the time anyway...
In early 2022 we started having difficulties. The database for Drupal was not on a separate container dedicated to databases; it was instead running on 'localhost', which started having filesystem-related problems. Those problems took months to identity and resolve, so in the meantime the database was experiencing some data consistency issues, resulting in a ton of extra work (including restoration from nightly backups). Thankfully we lost no pages, but only owing to a lot of manual interventions. This was no fun. Lessons learned...
Solution
In more recent years the sites moved to their very own system, or a static site generator that is simple and flexible enough to extend without an upstream project such as Drupal and WordPress (always racing to break stuff and impose bloat you neither asked for nor needed).
In summer of 2022 we migrated a site founded in 2004 (tuxmachines.org), based on Drupal, to a new perl-based static site generator. tuxmachines.org would basically be 'archived', over time, and news.tuxmachines.org would be a 'fresh start' with a new system. The project was a success and the site is growing by about 50 pages per day. The site is super-stable. There's very little maintenance associated with something like a database.
Moving Ahead
This past September, just over a year later, we did the same to techrights.org, a site that turned 17 a number of days ago. techrights.org ran Drupal, WordPress, and MediaWiki. Now it runs none of those things. The old addresses still mostly work, so we didn't lose anything, albeit it's still work in progress. We still need to properly restore a number of "niche" pages, some of them in Gemini.
In techrights.org we are still making improvements to the new static site generator. Not only was the migration successful; it resulted in page delivery times about 10 times faster and we’re able to produce more a lot faster. Details about the perl-based static site generator were presented in a conference this past summer. A recent and reasonable stable version of the code is fully available via Gemini. The code is AGPLv3-licensed and available via Git or Gemini Protocol, with an HTTP/S gateway enabling access in case one lacks a Gemini client.
Both sites are now composed and edited by an international team. A lot of the editing is managed via ssh with UNIX-style permissions/access control. The scale of the perl code is a few thousands of lines of code, plus bash wrappers and aliases to simplify usage. █