Skip to content

Commit

Permalink
Fixes #54
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jun 17, 2024
1 parent 0fdf8bf commit 49b08a5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/virtualTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,23 @@ async function eleventyFeedPlugin(eleventyConfig, options = {}) {
throw new Error("Missing `collection.name` option in feedPlugin from @11ty/eleventy-plugin-rss.");
}

let eleventyExcludeFromCollections;
let eleventyImport;
if(options.collection.name === "all") {
eleventyExcludeFromCollections = true;
eleventyImport = {};
} else {
eleventyExcludeFromCollections = [ options.collection.name ]
eleventyImport = {
collections: [ options.collection.name ],
};
}

let templateData = {
...options?.templateData || {},
permalink: options.outputPath,
eleventyExcludeFromCollections: [ options.collection.name ],
eleventyImport: {
collections: [ options.collection.name ],
},
eleventyExcludeFromCollections,
eleventyImport,
layout: false,
metadata: options.metadata,
};
Expand Down

0 comments on commit 49b08a5

Please sign in to comment.