-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
32 lines (26 loc) · 941 Bytes
/
.eleventy.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
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
const pluginRss = require("@11ty/eleventy-plugin-rss");
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy({ "./static/": "/" });
eleventyConfig.addPassthroughCopy({
"node_modules/@fontsource-variable/libre-franklin/index.css":
"/fonts/libre-franklin.css",
"node_modules/@fontsource-variable/libre-franklin/files": "/fonts/files",
});
eleventyConfig.setFrontMatterParsingOptions({ excerpt: true });
eleventyConfig.addCollection("news", (collectionApi) =>
collectionApi.getFilteredByGlob("pages/news/**/*.md"),
);
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
eleventyConfig.addPlugin(pluginRss);
return {
templateFormats: ["11ty.js", "md", "njk"],
markdownTemplateEngine: false,
dir: {
input: "pages",
includes: "../src",
output: "_site",
},
pathPrefix: "/",
};
};