0
0
mirror of https://github.com/python-LimeReport/pypi.git synced 2024-12-24 00:33:04 +03:00
pypi/.eleventy.js

26 lines
624 B
JavaScript
Raw Normal View History

2023-09-10 13:27:24 +03:00
const htmlmin = require("html-minifier");
module.exports = function(eleventyConfig) {
2023-09-10 13:27:24 +03:00
eleventyConfig.addTransform("htmlmin", function(content, outputPath) {
if (outputPath.endsWith(".html")) {
let minified = htmlmin.minify(content, {
useShortDocType: true,
removeComments: true,
collapseWhitespace: true,
})
return minified;
}
})
return {
dir: {
input: 'src',
output: 'dist',
includes: 'includes',
layouts: 'layouts',
data: 'data',
},
dataTemplateEngine: 'njk',
}
}