-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eleventy.js
More file actions
22 lines (18 loc) · 741 Bytes
/
.eleventy.js
File metadata and controls
22 lines (18 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export default async function(eleventyConfig) {
// Map location of files directly, instead of the default of creating
// a subdirectory for every file and naming it `index.html`.
eleventyConfig.addGlobalData("permalink", () => {
return (data) => `${data.page.filePathStem}.${data.page.outputFileExtension}`;
});
eleventyConfig.addPassthroughCopy("src/css");
eleventyConfig.addPassthroughCopy("src/img");
eleventyConfig.addPassthroughCopy("CNAME");
return {
dir: {
input: "src", // Input files location
output: "docs", // Output files location
includes: "includes", // Location for includes like layouts
data: "data" // Location for global data files
}
};
};