fix: add watchIgnores to prevent rebuild loop

When Eleventy's output (_site) is a symlink to /app/data/site, the watcher
was detecting changes to its own output and triggering infinite rebuilds.
This adds explicit ignores for both the symlink and its target path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ricardo
2026-02-04 23:42:33 +01:00
parent ff2c0950b7
commit 625ad5c16c

View File

@@ -21,9 +21,17 @@ export default function (eleventyConfig) {
// Ignore output directory (prevents re-processing generated files via symlink)
eleventyConfig.ignores.add("_site");
eleventyConfig.ignores.add("_site/**");
eleventyConfig.ignores.add("/app/data/site");
eleventyConfig.ignores.add("/app/data/site/**");
eleventyConfig.ignores.add("node_modules");
eleventyConfig.ignores.add("node_modules/**");
// Configure watch targets to exclude output directory
eleventyConfig.watchIgnores.add("_site");
eleventyConfig.watchIgnores.add("_site/**");
eleventyConfig.watchIgnores.add("/app/data/site");
eleventyConfig.watchIgnores.add("/app/data/site/**");
// Configure markdown-it with linkify enabled (auto-convert URLs to links)
const md = markdownIt({
html: true,