generated from kevin-powell/JAMStack-blog-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eleventy.js
34 lines (30 loc) · 1.12 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
const {DateTime} = require("luxon");
const pluginSEO = require("eleventy-plugin-seo");
//const schema = require("@quasibit/eleventy-plugin-schema");
const generateSocialImages = require("@manustays/eleventy-plugin-generate-social-images");
module.exports = function(eleventyConfig){
eleventyConfig.addPlugin(pluginSEO, require("./src/_data/seo.json"));
eleventyConfig.addPassthroughCopy('./src/style.css');
eleventyConfig.addPassthroughCopy('./src/assets');
eleventyConfig.addPassthroughCopy('./src/assets/blog');
eleventyConfig.addPassthroughCopy('./src/admin');
eleventyConfig.addPlugin(generateSocialImages, {
promoImage: "./src/assets/logo.png",
outputDir: "./public/assets/preview",
urlPath: "/assets/preview",
siteName: "heritagedigital.org",
titleColor: "white",
bgColor: ['#38baad'],
lineBreakAt: 45,
});
//eleventyConfig.addPlugin(schema);
eleventyConfig.addFilter("postDate", (dateObj) => {
return DateTime.fromJSDate(dateObj).toLocaleString(DateTime.DATE_MED);
})
return{
dir:{
input: "src",
output:"public"
}
}
}