migrated to eleventy
This commit is contained in:
parent
c3df49f1ce
commit
7e602d75c3
5 changed files with 85 additions and 222 deletions
45
.eleventy.js
Normal file
45
.eleventy.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
const pluginRev = require("eleventy-plugin-rev");
|
||||
const eleventySass = require("eleventy-sass");
|
||||
const tinyHTML = require('@sardine/eleventy-plugin-tinyhtml');
|
||||
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addPlugin(pluginRev);
|
||||
eleventyConfig.addPlugin(tinyHTML);
|
||||
eleventyConfig.addPlugin(eleventySass, {
|
||||
sass: {
|
||||
loadPaths: ["node_modules"],
|
||||
style: "compressed",
|
||||
sourceMap: false,
|
||||
},
|
||||
compileOptions: {
|
||||
permalink: function (contents, inputPath) {
|
||||
return (data) => {
|
||||
return data.page.filePathStem.replace(/^\/scss\//, "/css/") + ".css";
|
||||
};
|
||||
}
|
||||
},
|
||||
rev: true
|
||||
});
|
||||
|
||||
eleventyConfig.setUseGitIgnore(false);
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
"src/img": "img",
|
||||
"src/favicon.*": "",
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts": "webfonts",
|
||||
});
|
||||
|
||||
return {
|
||||
// Pre-process *.html files with: (default: `liquid`)
|
||||
htmlTemplateEngine: "njk",
|
||||
// Opt-out of pre-processing global data JSON files: (default: `liquid`)
|
||||
dataTemplateEngine: "njk",
|
||||
|
||||
dir: {
|
||||
input: "src",
|
||||
// includes: "_includes",
|
||||
// layouts: "_includes/layouts",
|
||||
data: "_data",
|
||||
output: `dist`
|
||||
}
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue