2023-09-01 A simple Things I Learned (TIL) Site with GitHub

#Productivity

A simple Things I Learned (TIL) Site with GitHub

One interesting thing I saw recently is Simon Willison's TIL site, which is pretty much like a fusion of a microblog and a knowledge base. So I decided to put something like that up for myself, since, well, writing a full blog entry about something is a pretty high bar to jump and usually quite timeconsuming, so I needed an alternative. As it turned out, It's pretty easy to set that up with GitHub using GitHub Pages - that automatically turns Markdown files into HTML, providing a nice serverless site where creating a new page amounts to checking in a Markdown file.

Even more - the standard workflow that creates the site on GitHub uses the configurable and flexible Jekyll to transform the markdown to HTML, and supports using themes, so it can even look nice without much effort . I picked the Leap day theme, which seems nice enough for now; using that amounts to creating a _config.yml file.

There are some features I wanted that aren't directly supported: a sitemap.xml for Google, a categorized article list at the entry page and a site search. An easy way to do that was to make a Gihub Actions workflow Update Index that calls a couple of scripts in bin/ that implement the features. If you like to have a look at them you are welcome - they are pretty straightforward; I always let ChatGPT have a shot at them using my Developers Toolbench - that helped, but I mostly had to do some debugging and rewriting. They run over all /.md files; I guess the most interesting thing was [how to determine the first and last commit that actually changed each file], barring any simple renaming commits.

For the site search I tried adding a Google site search, though that needs Google to actually fetch and index the pages, and Google seems to be really really swamped with such things these times - there are pages on www.stoerr.net waiting to be indexed for months, although they are in the sitemap.xml and I even explicitly added it to Google. 8-{ So I'll probably need to create another solution.

Later I discovered that there is a Jekyll plugin for a sitemap, but that'd likely show the page dates instead of the last time the page actually changed, so I'd rather do it myself. I suspect that I'll use more Jekyll features over time, though.

Drumroll: so here it is, my new TIL site. Tell me what you think!