-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
33 lines (31 loc) · 1.08 KB
/
.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
const eleventySass = require("@11tyrocks/eleventy-plugin-sass-lightningcss");
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const mdxPlugin = require("@jamshop/eleventy-plugin-mdx");
const eleventyPluginPhosphoricons = require('eleventy-plugin-phosphoricons');
module.exports = function (config) {
config.addPlugin(syntaxHighlight);
config.addPlugin(eleventySass);
config.addPassthroughCopy("src/media");
config.addPassthroughCopy("src/content");
config.addPlugin(mdxPlugin);
config.addFilter("shuffle", function(array) {
let shuffledArray = array.slice();
for (let i = shuffledArray.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[shuffledArray[i], shuffledArray[j]] = [shuffledArray[j], shuffledArray[i]];
}
return shuffledArray;
});
config.addPlugin(eleventyPluginPhosphoricons, {
class: "phicon",
style: "vertical-align: middle;",
size: 32,
fill: "currentColor"
});
return {
dir: {
input: "src",
output: "public",
},
};
};