-
-
Couldn't load subscription status.
- Fork 106
Open
Description
Hello again,
Continuing my journey with 11ty, I saw that my sitemap.xml had some big holes in it.
Do you think this would be interesting to change the html-config.js like this
eleventy-excellent/src/_config/plugins/html-config.js
Lines 3 to 7 in 3f56328
| const isProduction = process.env.ELEVENTY_ENV === 'production'; | |
| export const htmlConfig = eleventyConfig => { | |
| eleventyConfig.addTransform('html-minify', (content, path) => { | |
| if (path && path.endsWith('.html') && isProduction) { |
To something like this :
const isProduction = process.env.ELEVENTY_ENV === 'production';
const extensions = ['.html', '.xml']
export const htmlConfig = eleventyConfig => {
eleventyConfig.addTransform('html-minify', (content, path) => {
if (path && extensions.some(ext => path.endsWith(ext)) && isProduction) {Metadata
Metadata
Assignees
Labels
No labels