λ ryan. himmelwright. net

Added 'now' and 'then' Pages

A heavily filtered image of a keyboard, notebook, and two computer monitors
An old (filtered) photo of my computer setup in college. I thought it might fit the 'now and then' topic...

I didn’t plan on having back-to-back “I added Y type of page to the site” announcement posts… but here we are. There’s not much to say for this one, but I’m about to publish the changes and figured I might as well include another short announcement post, similar to when I added the uses archive last month.

I’ve wanted to create a now page for a very long time. However, I wasn’t really working on anything I wanted to share, and I wanted to implement the uses archive first. With that done, I’ve finally added now pages.

The implementation is basically the same as the uses pages. I reused the same code from the ‘uses archive’ and created new collection to grab and list the ‘then’ pages:


  // Then Archive Collection
  eleventyConfig.addCollection("thenArchivePages", function(collectionApi) {
    return collectionApi.getFilteredByGlob("src/pages/now/then/*/*.md")
          .sort((a, b) => new Date(b.data.date) - new Date(a.data.date));
  });

(I know this probably still isn’t the best way to do it… but hey, it works)

After that, it was just some minor skeleton work and actually writing the content. But that was it.

You can find the now page here, and eventually – once I have more than one entry – the then pages will be listed here. Enjoy!

- Back to Post Index -