-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
37 lines (32 loc) · 952 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
33
34
35
36
37
const {
pluginPrismic,
definePrismicPluginOptions,
} = require("eleventy-plugin-prismic");
const prismicPluginOptions = definePrismicPluginOptions({
endpoint: "developerblog",
clientConfig: {
accessToken: "2c5007bbe230022f48f2a619407e3d2d",
},
routes: [
{
type: "page",
path: "/",
},
{ type: "developer_posts", path: "/blog/:uid" },
],
});
const config = function (eleventyConfig) {
eleventyConfig.addPlugin(pluginPrismic, prismicPluginOptions);
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
eleventyConfig.addPlugin(syntaxHighlight);
eleventyConfig.addFilter("markdown", function (value) {
let markdown = require("markdown-it")({
html: true,
});
return markdown.render(value);
});
js = eleventyConfig.javascriptFunctions;
eleventyConfig.addPassthroughCopy("css");
};
config.prismicPluginOptions = prismicPluginOptions;
module.exports = config;