From ed3ff984409ba89a167c3f801be5ced9e033670a Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Tue, 16 Apr 2024 22:07:58 +0800 Subject: [PATCH] Remove custom collection for feed items and fix tag fileter for contents --- eleventy.config.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index fc8eac66..28806488 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -89,17 +89,10 @@ module.exports = function (eleventyConfig) { /* This is the part that tells 11ty to swap to our custom config */ eleventyConfig.setLibrary("md", markdownLibrary); - // Add contents to a feed items collection - eleventyConfig.addCollection("feedItems", function (collectionApi) { - return collectionApi.getFilteredByTags( - 'articles', 'posts', 'changelogs' - ); - }); - // Add content categories to a collection eleventyConfig.addCollection("categories", function(collectionApi) { let categories = new Set(); - let contents = collectionApi.getFilteredByTags('articles', 'posts'); + let contents = collectionApi.getFilteredByTag('contents'); contents.forEach(p => { let cats = p.data.categories; cats.forEach(c => categories.add(c));