Making a Games Collection

I started moving my game review content over to a separate collection, with each game being its own item. My previous Games 2020 post as a single long post of every game worked well at the time, but the number of games I’m trying out is increasing and I would like to maintain more metadata about each one.

Content goals that this restructuring works better with:

  • improved metadata: when I played something, rating/fav status, outgoing links, platform, game tags
  • updating new thoughts over time: I would like to figure out a better way of doing this that support datestamped updates. For now I’ll just use headings.
  • better findability/archiving

I’ve migrated over most of my 2021 games; I’ll do 2020 gradually.

I’m sorting the list alphabetically, which isn’t natively supported in liquid (why? what?) so I had to make a custom collection, taken from this issue on github:

eleventyConfig.addCollection("gamesSorted", function(collection) {
return collection.getFilteredByGlob("games/*.md").sort(function(a, b) {
let nameA = a.data.title.toUpperCase();
let nameB = b.data.title.toUpperCase();
if (nameA < nameB) return -1;
else if (nameA > nameB) return 1;
else return 0;
});
});

and used as a normal collection:

{% for game in collections.gamesSorted %}

If I ever start reading books again and make notes on them (haha), I could reuse this structure for highlights/quotes. My movies list will remain short and abridged as a JSON file.