Sitemap issue when compiling sass with custom template language example #2850
-
When I add sass as a template language, I get the correct single main.css file in my output dir, but my sitemap includes what appear to be intermediate files produced by the rendering. Here's the code I'm using in my eleventy config to add sass:
I have 5 files in my css folder within my input directory:
main.scss includes 4 @ use statements to bring in the other 4 files. In the resulting sitemap.xml file, in addition to the expected urls, I also get the following:
It seems that all of the files get added to collections.all. I have tried to use compileOptions: false, by adding the following just after the outputFileExtension.
I get the following error regarding the sitemap template when I run it with this.
I looked at the other discussion topics that make use of compileOptions, but they seem to be different use cases. What am I missing here? Any help is appreciated. I did all this based on the most recent version of the eleventy-base-blog. I eliminated the use of the css bundling and placed the css files in the input dir for this example. Here's a link to the repo. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @bobmonsour / @zachleat - a temporary workaround is to use a directory data file within /css/ (or other custom template language directory) to block the files from collections. Alternatively, make a custom collection vs. use the (PS - Bob, I just discovered this issue as well on Friday, I am pushing a README update to my sass plugin to callout this need for now!) // css/css.json
{
"eleventyExcludeFromCollections": true
} But I also absolutely upvote the need to block this earlier, thanks for filing! |
Beta Was this translation helpful? Give feedback.
Hi @bobmonsour / @zachleat - a temporary workaround is to use a directory data file within /css/ (or other custom template language directory) to block the files from collections. Alternatively, make a custom collection vs. use the
all
.(PS - Bob, I just discovered this issue as well on Friday, I am pushing a README update to my sass plugin to callout this need for now!)
But I also absolutely upvote the need to block this earlier, thanks for filing!