]> git.otsuka.systems Git - cotsuka.github.io/commitdiff
remove extra const
authorCameron Otsuka <cameron@otsuka.haus>
Fri, 21 Mar 2025 17:12:58 +0000 (10:12 -0700)
committerCameron Otsuka <cameron@otsuka.haus>
Fri, 21 Mar 2025 17:12:58 +0000 (10:12 -0700)
eleventy.config.js

index 2d1a7f245cc0afccc43ff2790ff02ea9b006b767..149414d49cd5b5acddef7a39bab58794f8d823ed 100644 (file)
@@ -33,11 +33,10 @@ function isFullUrl(url) {
 
 export default async function (eleventyConfig) {
        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 (const category in categories) {
-                       collectionSubset.push(...collectionApi.getFilteredByTag(categories[category]))
+               for (const category in globalMetadata['categories']) {
+                       collectionSubset.push(...collectionApi.getFilteredByTag(category))
                }
                let sortedSubset = collectionSubset.sort(function(a, b) {
                        // maintain sort order when working with default collections objects