Making a TIL section with Hugo and PaperMod

I started following Simon Willison as a way of getting informed about practical applications of large language models. It turns out that Simon is also an incredibly prolific blogger and open source contributor, with posts dating back to 2002. He recently gave an interview titled The Data Enthusiast’s Toolkit, where he discussed his Datasette project and a bit about his approach to writing online. In addition to his main blog, he maintains a separate TIL subdomain, where shares things he’s learned in quick rough posts.

Most of my main website posts take a while to write, so I post infrequently. I enjoy the process of learning about topics through public writing, as I often start out thinking things are a certain way, and then make new discoveries when I search for references. However, I liked the idea of sharing more through quicker posts, so I decided to add a TIL section to my site.

I made the switch from WordPress.com to Hugo almost two years ago and haven’t looked back. I love the extra control that it gives me, though it sometimes requires a bit of tinkering. However, adding a TIL section was a breeze thanks to a post by Jacob Kaplan-Moss. Since I use the PaperMod theme and my site is set up differently, I followed slightly different steps (links are to commits in the PR that added the TIL section):

  1. Copied the PaperMod’s archives.html to layout/til/list.html to serve as the base list layout under /til/.
  2. Tweaked the new list.html to only show posts of type til, and removed counts and drafts.
  3. Added content/til/_index.md with the section’s title and description, which are shown at the top of the list view and in meta tags.
  4. Added my first TIL post with a lovely quote from How to Speak Whale.

Unlike Jacob, I don’t mind TIL posts showing up in the main RSS feed. It’s enough for me that they don’t show up on the main page, which didn’t require any configuration tweaks in my case.

When I push changes to the website, I like checking the gh-pages branch to see what got deployed. Recently I added an additional gh-pages-unminified branch to produce a more human-friendly diff. You can see the human-friendly result of merging the PR that added the TIL section here.

That’s it for now. If I post TILs consistently, I will probably link to it from the top-level menu and tweak the /til/ page to also show posts by tag. For now, I like the idea of a quiet low-effort place to post publicly.

Public comments are closed, but I love hearing from readers. Feel free to contact me with your thoughts.

Subscribe