From cc49a8941b9a72d4dc1d7ff8b82f742269ec92fe Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Tue, 16 Apr 2024 20:32:43 +0800 Subject: [PATCH] Add feed item collection --- eleventy.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eleventy.config.js b/eleventy.config.js index 8c24371d..fc8eac66 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -89,6 +89,13 @@ 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();