Last active
October 6, 2022 00:09
-
-
Save rascode/ad5b85e215aa29342108707233206b3a to your computer and use it in GitHub Desktop.
11ty Configuration Templates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pluginWebc = require("@11ty/eleventy-plugin-webc"); | |
module.exports = function(eleventyConfig) { | |
//passthroughs | |
eleventyConfig.addPassthroughCopy("manifest.json"); //site manifest file | |
eleventyConfig.addPassthroughCopy(".prettierrc"); //prettier config file | |
eleventyConfig.addPassthroughCopy({"src/assets/" : "/assets/"}); // assets directory | |
eleventyConfig.addPassthroughCopy({"src/styles" : "/styles/"); //css directory | |
//plugins | |
eleventyConfig.addPlugin(pluginWebc, {components: "includes/components/**/*.webc",}); //global webc support | |
return { | |
dir:{ | |
input: "src/content", | |
data: "../data", | |
includes: "../templates/includes", | |
layouts: "../templates/layouts", | |
output: "dist" | |
}, | |
dataTemplateEngine: "njk", | |
markdownTemplateEngine: 'njk', | |
htmlTemplateEngine: "njk", | |
templateFormats: ["html", "liquid", "njk", "md", "webc"], | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mac Files | |
.DS_Store | |
# NodeJS | |
node_modules | |
# Environment Variables | |
.env | |
# Build Folders | |
dist | |
build | |
public | |
_dist | |
_build | |
_public |
Updated eleventy configuration file include defaults for passthroughs, ignored files and personalized standard folder structure.
Added comments to .gitignore file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note
Read more on 11ty ignore files in the official 11ty docs.