Properly exclude admin and tasks folders from 11ty template processing
Previous attempt still processed files in admin folder. Now using ignores.add() for entire folders (admin/**, tasks/**) so 11ty only copies them via passthrough, doesn't render as templates. This prevents build failures on HTML files with React/JSX syntax.
This commit is contained in:
12
.eleventy.js
12
.eleventy.js
@@ -4,16 +4,16 @@ module.exports = function(eleventyConfig) {
|
|||||||
eleventyConfig.addPassthroughCopy("src/css");
|
eleventyConfig.addPassthroughCopy("src/css");
|
||||||
eleventyConfig.addPassthroughCopy("assets");
|
eleventyConfig.addPassthroughCopy("assets");
|
||||||
|
|
||||||
// Decap CMS admin panel
|
// Decap CMS admin panel - copy entire folder without template processing
|
||||||
eleventyConfig.addPassthroughCopy("admin");
|
eleventyConfig.addPassthroughCopy("admin");
|
||||||
|
|
||||||
// Mobile task manager - IGNORE, don't process as template
|
// Tasks folder - copy without template processing
|
||||||
eleventyConfig.ignores.add("admin/mobile.html");
|
|
||||||
eleventyConfig.addPassthroughCopy("admin/mobile.html");
|
|
||||||
|
|
||||||
// Tasks folder
|
|
||||||
eleventyConfig.addPassthroughCopy("tasks");
|
eleventyConfig.addPassthroughCopy("tasks");
|
||||||
|
|
||||||
|
// Tell 11ty to ignore these folders completely (don't try to render as templates)
|
||||||
|
eleventyConfig.ignores.add("admin/**");
|
||||||
|
eleventyConfig.ignores.add("tasks/**");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dir: {
|
dir: {
|
||||||
input: ".",
|
input: ".",
|
||||||
|
|||||||
Reference in New Issue
Block a user