From a0040c949dceefd5f23fde4731591f0b74ed9309 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Wed, 18 Feb 2026 17:31:00 +0100 Subject: [PATCH] fix: pagefind output directory to match template references Templates reference /pagefind/pagefind-ui.js but pagefind defaulted to _pagefind/ (with underscore). Added --output-subdir pagefind flag and updated ignores to match. --- .gitignore | 2 +- eleventy.config.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index bdc8b28..1b6c845 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ node_modules/ # Build output _site/ -_pagefind/ +pagefind/ css/style.css # Cache diff --git a/eleventy.config.js b/eleventy.config.js index c599a0d..6f53773 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -32,16 +32,16 @@ export default function (eleventyConfig) { eleventyConfig.ignores.add("README.md"); // Ignore Pagefind output directory - eleventyConfig.ignores.add("_pagefind"); - eleventyConfig.ignores.add("_pagefind/**"); + eleventyConfig.ignores.add("pagefind"); + eleventyConfig.ignores.add("pagefind/**"); // 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/**"); - eleventyConfig.watchIgnores.add("_pagefind"); - eleventyConfig.watchIgnores.add("_pagefind/**"); + eleventyConfig.watchIgnores.add("pagefind"); + eleventyConfig.watchIgnores.add("pagefind/**"); eleventyConfig.watchIgnores.add(".cache/og"); eleventyConfig.watchIgnores.add(".cache/og/**"); @@ -621,7 +621,7 @@ export default function (eleventyConfig) { // Pagefind indexing try { console.log(`[pagefind] Indexing ${dir.output} (${runMode})...`); - execFileSync("npx", ["pagefind", "--site", dir.output, "--glob", "**/*.html"], { + execFileSync("npx", ["pagefind", "--site", dir.output, "--output-subdir", "pagefind", "--glob", "**/*.html"], { stdio: "inherit", timeout: 60000, });