]> git.otsuka.systems Git - cotsuka.github.io/commitdiff
fix activities collection, add perfect days review
authorCameron Otsuka <cameron@otsuka.haus>
Sun, 16 Feb 2025 06:38:18 +0000 (22:38 -0800)
committerCameron Otsuka <cameron@otsuka.haus>
Sun, 16 Feb 2025 06:38:18 +0000 (22:38 -0800)
content/reviews/perfect-days.md [new file with mode: 0644]
eleventy.config.cjs

diff --git a/content/reviews/perfect-days.md b/content/reviews/perfect-days.md
new file mode 100644 (file)
index 0000000..6f5fd9b
--- /dev/null
@@ -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
index 464ba47a99b720e46beffd825854f5f7d941d877..e636a5145e09ec604f3ac3c23dff1099b52823eb 100644 (file)
@@ -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;