Skip to content

Commit

Permalink
feat: exclude CSS and Sass files from collections (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Aug 15, 2023
1 parent ed332e6 commit d25c434
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.js
Expand Up @@ -167,6 +167,11 @@ module.exports = {
eleventyConfig.addTemplateFormats("css");
eleventyConfig.addExtension("css", {
outputFileExtension: "css",
getData: async function () {
return {
eleventyExcludeFromCollections: true
};
},
compile: async function (inputContent, inputPath) {
return await compileCss(inputContent, inputPath, options.css);
}
Expand All @@ -177,6 +182,11 @@ module.exports = {
eleventyConfig.addTemplateFormats("scss");
eleventyConfig.addExtension("scss", {
outputFileExtension: "css",
getData: async function () {
return {
eleventyExcludeFromCollections: true
};
},
compile: async function (inputContent, inputPath) {
return await compileSass(inputContent, inputPath, options.sass, this);
}
Expand Down

0 comments on commit d25c434

Please sign in to comment.