-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheleventy.config.js
61 lines (55 loc) · 1.99 KB
/
eleventy.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Installed Plugins
import { InputPathToUrlTransformPlugin } from "@11ty/eleventy";
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
import pluginEleventyNavigation from "@11ty/eleventy-navigation";
import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
import pluginWordcount from "eleventy-plugin-wordcount-extended";
// Custom configurations
import markdownItConfig from "./src/_config/markdown-it.js";
import filesConfig from "./src/_config/files.js";
import collectionsConfig from "./src/_config/collections.js";
import filtersConfig from "./src/_config/filters.js";
import shortCodesConfig from "./src/_config/shortcodes.js";
// Sitemeta
import { siteLang, feedPath, siteAuthor, siteUrl } from "./src/_data/sitemeta.js";
export default function(eleventyConfig) {
// Installed Plugins
eleventyConfig.addPlugin(InputPathToUrlTransformPlugin);
eleventyConfig.addPlugin(feedPlugin, {
type: "atom",
outputPath: feedPath,
collection: {
name: "posts",
limit: 10,
},
metadata: {
language: siteLang,
title: siteAuthor.name + "'s Developer Blog",
subtitle: siteAuthor.name + " talks about tech, coding and development.",
base: siteUrl + "/blog/",
author: {
name: siteAuthor.name,
email: siteAuthor.email,
}
}
});
eleventyConfig.addPlugin(pluginEleventyNavigation);
eleventyConfig.addPlugin(pluginSyntaxHighlight, { preAttributes: { tabindex: 0 } });
eleventyConfig.addPlugin(pluginWordcount);
// Custom configurations
eleventyConfig.addPlugin(markdownItConfig);
eleventyConfig.addPlugin(filesConfig);
eleventyConfig.addPlugin(collectionsConfig);
eleventyConfig.addPlugin(filtersConfig);
eleventyConfig.addPlugin(shortCodesConfig);
// Eleventy bundle plugin
eleventyConfig.addBundle("css");
eleventyConfig.addBundle("js", { toFileDirectory: "assets/js" });
return {
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
dir: {
input: "src"
}
};
};