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.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',
|
||||||
|
|
Reference in a new issue