From: Cameron Otsuka Date: Sun, 16 Feb 2025 06:38:18 +0000 (-0800) Subject: fix activities collection, add perfect days review X-Git-Tag: v1.0.0~41 X-Git-Url: https://git.otsuka.systems/?a=commitdiff_plain;h=e24648d013784add72ee2138028a7a2cb6840150;p=cotsuka.github.io fix activities collection, add perfect days review --- diff --git a/content/reviews/perfect-days.md b/content/reviews/perfect-days.md new file mode 100644 index 0000000..6f5fd9b --- /dev/null +++ b/content/reviews/perfect-days.md @@ -0,0 +1,22 @@ +--- +title: Perfect Days +date: 2025-02-15 +modified: 2025-02-15 +description: ★★★★ +tags: +- movie +posse: + Letterboxd: https://letterboxd.com/cotsuka/film/perfect-days-2023/ +--- + +- noticing the little things in life +- very shinto vibes: + - *komorebi* + - god is in everything + - the aya kōda reference; inspiration? +- i have never seen this floor cleaning technique in my life +- clearly family drama he's still moving past: + - his niece's mention of the terrapin? +- everybody in their own different, little worlds + +enjoying your routine, waking up early with a smile on your face, looking at the trees, listening to good tunes, taking pride in your work, having some up and down days -- truly perfect days diff --git a/eleventy.config.cjs b/eleventy.config.cjs index 464ba47..e636a51 100644 --- a/eleventy.config.cjs +++ b/eleventy.config.cjs @@ -32,10 +32,18 @@ function isFullUrl(url) { } module.exports = async function (eleventyConfig) { - eleventyConfig.addCollection("activities", function(collectionApi) { - return collectionApi.getFilteredByTag( - ...Object.keys(globalMetadata['categories']) - ).sort((a, b) => a.date - b.date) + eleventyConfig.addCollection("activities", async (collectionApi) => { + const categories = Object.keys(globalMetadata['categories']); + let collectionSubset = []; + // getFilteredByTag matches ALL tags its passed, not any, so we have to do this + for (category in categories) { + collectionSubset.push(...collectionApi.getFilteredByTag(categories[category])) + } + let sortedSubset = collectionSubset.sort(function(a, b) { + // maintain sort order when working with default collections objects + return a.date - b.date; + }); + return sortedSubset; }); eleventyConfig.addFilter("cssmin", function (code) { return new cleanCSS({}).minify(code).styles;