fix: changed config of .eleventy.js accordingly

This commit is contained in:
Laureηt 2021-10-07 18:44:29 +02:00
parent 90d12caee2
commit 59b130f31f
No known key found for this signature in database
GPG key ID: D88C6B294FD40994

View file

@ -5,11 +5,9 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(pluginNavigation); eleventyConfig.addPlugin(pluginNavigation);
eleventyConfig.addPassthroughCopy('pages/css');
eleventyConfig.addPassthroughCopy('pages/content');
eleventyConfig.addPassthroughCopy('assets/');
eleventyConfig.addPassthroughCopy({ eleventyConfig.addPassthroughCopy({
"node_modules/chaffle/docs/chaffle.min.js": "javascript/chaffle.min.js", "node_modules/chaffle/docs/chaffle.min.js": "javascript/chaffle.min.js",
"assets/": "./",
}); });
if (process.env.ELEVENTY_ENV == 'prod') { if (process.env.ELEVENTY_ENV == 'prod') {
@ -19,7 +17,9 @@ module.exports = function (eleventyConfig) {
let minified = htmlmin.minify(content, { let minified = htmlmin.minify(content, {
useShortDoctype: true, useShortDoctype: true,
removeComments: true, removeComments: true,
collapseWhitespace: true collapseWhitespace: true,
minifyJS: true,
minifyCSS: true,
}); });
return minified; return minified;
} else { } else {
@ -35,7 +35,7 @@ module.exports = function (eleventyConfig) {
return { return {
dir: { dir: {
input: "pages" input: "src"
}, },
dataTemplateEngine: 'njk', dataTemplateEngine: 'njk',
htmlTemplateEngine: 'njk', htmlTemplateEngine: 'njk',