add aliases; comment edits;
This commit is contained in:
parent
fa83dde82c
commit
5175c2a9bd
1 changed files with 15 additions and 9 deletions
24
.eleventy.js
24
.eleventy.js
|
|
@ -1,15 +1,14 @@
|
||||||
const { DateTime } = require('luxon');
|
const { DateTime } = require("luxon");
|
||||||
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
// Passthrough copy
|
// PASSTHROUGHS
|
||||||
|
|
||||||
// Layouts //
|
// LAYOUTS //
|
||||||
config.addLayoutAlias("base", "base.njk");
|
config.addLayoutAlias("base", "layouts/base.njk");
|
||||||
config.addLayoutAlias("post", "post.njk");
|
config.addLayoutAlias("post", "layouts/post.njk");
|
||||||
config.addLayoutAlias("page", "page.njk");
|
|
||||||
|
|
||||||
// Transforms //
|
// TRANSFORMS //
|
||||||
// Minify HTML
|
// Minify HTML
|
||||||
const htmlMinTransform = require("./src/transforms/html-min.js");
|
const htmlMinTransform = require("./src/transforms/html-min.js");
|
||||||
const isProduction = process.env.ELEVENTY_ENV === "production";
|
const isProduction = process.env.ELEVENTY_ENV === "production";
|
||||||
|
|
@ -18,10 +17,17 @@ module.exports = function (config) {
|
||||||
config.addTransform("htmlmin", htmlMinTransform);
|
config.addTransform("htmlmin", htmlMinTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plug-Ins //
|
// PLUG-INS //
|
||||||
config.addPlugin(pluginRss);
|
config.addPlugin(pluginRss);
|
||||||
|
|
||||||
// Base confirguration //
|
// EXTRAS //
|
||||||
|
// Post List Excerpts
|
||||||
|
config.setFrontMatterParsingOptions({
|
||||||
|
excerpt: true,
|
||||||
|
excerpt_separator: "<!-- excerpt -->",
|
||||||
|
});
|
||||||
|
|
||||||
|
// BASE CONFIGURATION //
|
||||||
return {
|
return {
|
||||||
dir: {
|
dir: {
|
||||||
input: "src",
|
input: "src",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue