From e24648d013784add72ee2138028a7a2cb6840150 Mon Sep 17 00:00:00 2001 From: Cameron Otsuka Date: Sat, 15 Feb 2025 22:38:18 -0800 Subject: [PATCH] fix activities collection, add perfect days review --- content/reviews/perfect-days.md | 22 ++++++++++++++++++++++ eleventy.config.cjs | 16 ++++++++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 content/reviews/perfect-days.md 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; -- 2.51.0