Devlog, February 2025
Time to add a blog feature to the site, which is literally the “hello world” of any web framework. It certainly could have been simple, and the first pass was. Just make a new content collection, throw some markdown in there, and make a little index page. Went on a few journeys after that:
- how to handle “drafts”: Nuxt Content 2 had a native “draft” field, but 3 doesn’t for some reason. Fine, add that boolean yourself and only display it in dev mode. The draft pages were still showing up in Nuxt Sitemap, though. Ended up just keeping drafts off the main branch, then they never get published. If I do want to put them on main, I can hold them off with a
robots: false
. - how to handle dates: Posts have dates, but I like the idea of using dates in the future to stage content. In order to avoid dealing with time zones, I’ve got to think in UTC when writing things.
- feeds: It took longer to build the RSS feed (total subscribers: 1) than the blog feature.
- automatically create separate feeds for any nuxt-content collection matching a given schema
- convert content markdown to HTML to include in the feed (really surprising that I had to DIY this)
- in the HTML content, convert any relative links to absolute
- since I’m doing all of the above work rendering the content, cache the results until new posts are made, even though we’re probably only talking milliseconds here
- all of the above is an absurdly unnecessary amount of effort, but it was cool to learn more about remark and nitro caching.
The other project was another pass at the trips processor to link Swarm check-ins at airports to the corresponding flights from Flighty. Tricky when a “trip” has many flights, some get canceled, etc.
That eventually gets us to a trips page which displays all trips which have associated markdown content, and a trip page which displays a mix of content from Swarm, Flighty, Michelin, and what I’ve written from scratch.
One very satisfying piece of this is that components on that page which display data from the TRPC API can import types directly from the server, and those always stay in sync.
Next up is picking which of the 129 trips (so far) are worth writing about, and adding the written content(LLM assist?), photos, etc. Then finding the trips that aren’t in the data, by manually picking them out of Facebook, photo libraries, email receipts… fun?