fix: changed config of .eleventy.js accordingly
This commit is contained in:
parent
90d12caee2
commit
59b130f31f
10
.eleventy.js
10
.eleventy.js
|
@ -5,11 +5,9 @@ module.exports = function (eleventyConfig) {
|
|||
|
||||
eleventyConfig.addPlugin(pluginNavigation);
|
||||
|
||||
eleventyConfig.addPassthroughCopy('pages/css');
|
||||
eleventyConfig.addPassthroughCopy('pages/content');
|
||||
eleventyConfig.addPassthroughCopy('assets/');
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
"node_modules/chaffle/docs/chaffle.min.js": "javascript/chaffle.min.js",
|
||||
"assets/": "./",
|
||||
});
|
||||
|
||||
if (process.env.ELEVENTY_ENV == 'prod') {
|
||||
|
@ -19,7 +17,9 @@ module.exports = function (eleventyConfig) {
|
|||
let minified = htmlmin.minify(content, {
|
||||
useShortDoctype: true,
|
||||
removeComments: true,
|
||||
collapseWhitespace: true
|
||||
collapseWhitespace: true,
|
||||
minifyJS: true,
|
||||
minifyCSS: true,
|
||||
});
|
||||
return minified;
|
||||
} else {
|
||||
|
@ -35,7 +35,7 @@ module.exports = function (eleventyConfig) {
|
|||
|
||||
return {
|
||||
dir: {
|
||||
input: "pages"
|
||||
input: "src"
|
||||
},
|
||||
dataTemplateEngine: 'njk',
|
||||
htmlTemplateEngine: 'njk',
|
||||
|
|
Reference in a new issue