43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
// Add Syntax Highlighting plugin
|
|
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
|
// Add Inclusive Language plugin
|
|
const inclusiveLangPlugin = require("@11ty/eleventy-plugin-inclusive-language");
|
|
// Add Naviagation plugin
|
|
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
|
|
// Add read time
|
|
const emojiReadTime = require("@11tyrocks/eleventy-plugin-emoji-readtime");
|
|
|
|
module.exports = function(eleventyConfig) {
|
|
eleventyConfig.addPlugin(syntaxHighlight); // syntax highlighting
|
|
eleventyConfig.addPlugin(inclusiveLangPlugin); // inclusive language
|
|
eleventyConfig.addPlugin(eleventyNavigationPlugin); // navigation
|
|
eleventyConfig.addPlugin(emojiReadTime, {
|
|
emoji: "💠"
|
|
}); // read emojiReadTime
|
|
|
|
// add stylesheet
|
|
eleventyConfig.addPassthroughCopy("_src/style.css");
|
|
// add _media folder
|
|
eleventyConfig.addPassthroughCopy("_src/_media");
|
|
// add robots.txt
|
|
eleventyConfig.addPassthroughCopy({ '_src/robots.txt': '/robots.txt' });
|
|
|
|
// shortcodes
|
|
eleventyConfig.addShortcode("year", () => {
|
|
`${new Date().getFullYear()}`
|
|
});
|
|
|
|
// other settings
|
|
return {
|
|
markdownTemplateEngine: 'njk',
|
|
dataTemplateEngine: 'njk',
|
|
htmlTemplateEngine: 'njk',
|
|
dir: {
|
|
input: "_src",
|
|
output: "_site"
|
|
},
|
|
passthroughFileCopy: true
|
|
};
|
|
};
|
|
|