Site Maps

Or “Why I solve everything with shellscripts”

Sometime ago I started doing Search Engine Optimization — and before anybody flames me for it, I won’t add analytics beyond what Cloudflare ships, those are helpful for preventing bot spam. — which also meant making my <head> much bigger by including a lot of metadata. Another fun thing was adding a humans- and a robots.txt file. Spent the last thirty-or-something minutes writing a sitemap generator in bash, with a little help from ChatGPT for finding the right tools for the job. Is XMLStarlet overkill? …Probably. Does it work? Until you try to change something. Am I running it way too often? Arguably. But hey, the only dependency on Starlet is a single function that can be replaced quite easily. Feel free to look at the output yourself under sitemap.xml

As for why everything I do involves way too many shell scripts, I only know Python, Bash, that weird scripting language Plymouth uses and traces of C, but I’ve almost perfected the second one to the extent of an art form, so I’ll just use it until I have to do things properly.

Permanently borrow my code