fix: use Pagefind 1.x path and exclude non-HTML files from index

Update Pagefind asset URLs from /_pagefind/ to /pagefind/ to stop
the pre-1.0 compatibility mode that was writing the index twice.
Also ignore CLAUDE.md and README.md in Eleventy to prevent them
from being processed into HTML pages without an <html> element.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ricardo
2026-02-05 13:54:51 +01:00
parent e79f23309d
commit e5d699cffc
2 changed files with 4 additions and 2 deletions

View File

@@ -26,6 +26,8 @@ export default function (eleventyConfig) {
eleventyConfig.ignores.add("/app/data/site/**"); eleventyConfig.ignores.add("/app/data/site/**");
eleventyConfig.ignores.add("node_modules"); eleventyConfig.ignores.add("node_modules");
eleventyConfig.ignores.add("node_modules/**"); eleventyConfig.ignores.add("node_modules/**");
eleventyConfig.ignores.add("CLAUDE.md");
eleventyConfig.ignores.add("README.md");
// Ignore Pagefind output directory // Ignore Pagefind output directory
eleventyConfig.ignores.add("_pagefind"); eleventyConfig.ignores.add("_pagefind");

View File

@@ -10,11 +10,11 @@ pagefindIgnore: true
<p class="text-surface-600 dark:text-surface-400">Search across all posts, articles, notes, and pages.</p> <p class="text-surface-600 dark:text-surface-400">Search across all posts, articles, notes, and pages.</p>
</div> </div>
<link rel="stylesheet" href="/_pagefind/pagefind-ui.css"> <link rel="stylesheet" href="/pagefind/pagefind-ui.css">
<div id="search"></div> <div id="search"></div>
<script src="/_pagefind/pagefind-ui.js"></script> <script src="/pagefind/pagefind-ui.js"></script>
<script> <script>
window.addEventListener("DOMContentLoaded", () => { window.addEventListener("DOMContentLoaded", () => {
const ui = new PagefindUI({ const ui = new PagefindUI({