-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eleventy.js
More file actions
28 lines (25 loc) · 892 Bytes
/
Copy path.eleventy.js
File metadata and controls
28 lines (25 loc) · 892 Bytes
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
/**
* Eleventy config — better-pwa docs site.
* Run: npx @11ty/eleventy --serve (from project root)
*/
export default function (eleventyConfig) {
// Copy CSS directly to /css/ in output
eleventyConfig.addPassthroughCopy({ "docs/src/public/css": "css" });
// Copy JS, images, favicon to root
eleventyConfig.addPassthroughCopy({ "docs/src/public/js": "js" });
eleventyConfig.addPassthroughCopy({ "docs/src/public/images": "images" });
eleventyConfig.addPassthroughCopy({ "docs/src/public/favicon.ico": "favicon.ico" });
// Shortcodes
eleventyConfig.addShortcode("currentYear", () => String(new Date().getFullYear()));
return {
dir: {
input: "docs/src",
output: "docs/_site",
includes: "_includes",
data: "_data",
},
templateFormats: ["md", "njk", "html"],
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
};
}