- offer to create tag when none is found while adding a link from cli - fix tag display in search
17 lines
461 B
JavaScript
17 lines
461 B
JavaScript
import htmlmin from "html-minifier-terser";
|
|
|
|
export const htmlConfig = (eleventyConfig) => {
|
|
eleventyConfig.addTransform("html-minify", (content, path) => {
|
|
if (path && path.endsWith(".html")) {
|
|
return htmlmin.minify(content, {
|
|
collapseBooleanAttributes: true,
|
|
collapseWhitespace: true,
|
|
decodeEntities: true,
|
|
includeAutoGeneratedTags: false,
|
|
removeComments: true
|
|
});
|
|
}
|
|
|
|
return content;
|
|
});
|
|
};
|