plugins, filters, and passthroughs added
This commit is contained in:
parent
ffb7eb0477
commit
9ddec171d3
1 changed files with 16 additions and 2 deletions
18
.eleventy.js
18
.eleventy.js
|
|
@ -1,15 +1,23 @@
|
||||||
const { DateTime } = require("luxon");
|
const { DateTime } = require("luxon");
|
||||||
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
||||||
|
const svgSprite = require("eleventy-plugin-svg-sprite");
|
||||||
|
const w3Date = require("./src/filters/w3DateFilter.js");
|
||||||
|
const dateFilter = require('./src/filters/dateFilter.js');
|
||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
// PASSTHROUGHS
|
// PASSTHROUGHS
|
||||||
|
config.addPassthroughCopy("src/assets/images/");
|
||||||
|
|
||||||
// LAYOUTS //
|
// LAYOUTS //
|
||||||
config.addLayoutAlias("base", "layouts/base.njk");
|
config.addLayoutAlias("base", "layouts/base.njk");
|
||||||
config.addLayoutAlias("post", "layouts/post.njk");
|
config.addLayoutAlias("post", "layouts/post.njk");
|
||||||
|
|
||||||
|
// FILTERS //
|
||||||
|
config.addFilter('w3Date', w3Date);
|
||||||
|
config.addFilter('dateFilter', dateFilter);
|
||||||
|
|
||||||
// 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";
|
||||||
// html min only in production
|
// html min only in production
|
||||||
|
|
@ -19,8 +27,14 @@ module.exports = function (config) {
|
||||||
|
|
||||||
// PLUG-INS //
|
// PLUG-INS //
|
||||||
config.addPlugin(pluginRss);
|
config.addPlugin(pluginRss);
|
||||||
|
config.addPlugin(svgSprite, {
|
||||||
|
path: "./src/assets/icons",
|
||||||
|
svgShortcode: "icon",
|
||||||
|
globalClasses: "icon",
|
||||||
|
});
|
||||||
|
|
||||||
// EXTRAS //
|
// EXTRAS //
|
||||||
|
|
||||||
// Post List Excerpts
|
// Post List Excerpts
|
||||||
config.setFrontMatterParsingOptions({
|
config.setFrontMatterParsingOptions({
|
||||||
excerpt: true,
|
excerpt: true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue