mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 08:44:56 +02:00
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.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,7 +3,7 @@ node_modules/
|
||||
|
||||
# Build output
|
||||
_site/
|
||||
_pagefind/
|
||||
pagefind/
|
||||
css/style.css
|
||||
|
||||
# Cache
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user