Skip to content

Instantly share code, notes, and snippets.

@rascode
Last active October 6, 2022 00:09
Show Gist options
  • Save rascode/ad5b85e215aa29342108707233206b3a to your computer and use it in GitHub Desktop.
Save rascode/ad5b85e215aa29342108707233206b3a to your computer and use it in GitHub Desktop.
11ty Configuration Templates
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"],
}
};
# Mac Files
.DS_Store
# NodeJS
node_modules
# Environment Variables
.env
# Build Folders
dist
build
public
_dist
_build
_public
@rascode
Copy link
Author

rascode commented Feb 13, 2022

Added comments to .gitignore file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment