-
-
Notifications
You must be signed in to change notification settings - Fork 546
Closed
Labels
enhancementfeature: 🤟 custom template languageseleventyConfig.addExtension APIeleventyConfig.addExtension API
Milestone
Description
Operating system
Debian Testing
Eleventy
2.0.0
Describe the bug
Per instructions on the website and in various github issues, default layouts can be provided at the directory level (including the root via various methods). Unfortunately, these layouts are not specified to relevant file types and will wrap ALL 'templates' with the layout template, including assets that intend to generate css or javascript (or other new applications, like processing images).
Reproduction steps
- Set dir.input to 'src', create 'src' directory and add two files: 'layout.njk' and 'asset.scss'. Make sure layout.njk outputs {{ content | safe }}.
- Set the global layout either via src/src.json or via config object to 'layout.njk'.
- Use addTemplateFormats and addExtension to implement sass preprocessing as shown on the website.
- Run eleventy build and view the contents of asset.scss to see that the contents of layout.njk have been wrapped around it, with asset.scss taking the place of {{ content | safe }}.
Expected behavior
Expect that SCSS files will not be treated as an object with a 'layout'.
Reproduction URL
No response
Screenshots
No response
zachleat
Metadata
Metadata
Assignees
Labels
enhancementfeature: 🤟 custom template languageseleventyConfig.addExtension APIeleventyConfig.addExtension API