λ ryan. himmelwright. net

Added a 'uses' Page Archive

A stack of MacBooks
A stack of my current and precious MacBooks.

I’ve long wanted to dig through my website’s git history to unearth some of my old homelab and /uses pages to resurrect them on an archive page… someday. But with discussions about transient slash pages popping up on other blogs lately, I finally decided last week that it was time.

One of my motivations for switching to Eleventy was to make website customization like this easier. So far, I’m happy to say the switch was worth it, as implementing the archive wasn’t too difficult. I essentially added a subdirectory to store the archived /uses pages, and defined new collection to grab the pages and populate the the list of a new index page:

  // Uses Page Archive Collection
  eleventyConfig.addCollection("usesArchivePages", function(collectionApi) {
    return collectionApi.getFilteredByGlob("src/pages/uses/archive/*/*.md")
          .sort((a, b) => new Date(b.data.date) - new Date(a.data.date));
  });

(I know this probably isn’t the best way to do it… I’m still finding my way around eleventy – but it seems to work 😉)

I combed through the history and pulled out a snapshot page from every few months - usually when my setup had changed enough to justify a new entry. Overall, the selection provides a good enough historical timeline of my setup.

I plan to follow a similar approach going forward. I won’t spin off every little update into its’ own archive page. However, once enough changes have accumulated - usually when there’s a new photo, or I’ve swapped out a main device, I’ll make a new entry.

There’s still more I want to refine, like cleaning up the page formatting, and optimizing duplicate images, but for now it’s good enough.

Feel free to take a look if interested!

- Back to Post Index -