mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
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:
@@ -26,6 +26,8 @@ export default function (eleventyConfig) {
|
||||
eleventyConfig.ignores.add("/app/data/site/**");
|
||||
eleventyConfig.ignores.add("node_modules");
|
||||
eleventyConfig.ignores.add("node_modules/**");
|
||||
eleventyConfig.ignores.add("CLAUDE.md");
|
||||
eleventyConfig.ignores.add("README.md");
|
||||
|
||||
// Ignore Pagefind output directory
|
||||
eleventyConfig.ignores.add("_pagefind");
|
||||
|
||||
@@ -10,11 +10,11 @@ pagefindIgnore: true
|
||||
<p class="text-surface-600 dark:text-surface-400">Search across all posts, articles, notes, and pages.</p>
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" href="/_pagefind/pagefind-ui.css">
|
||||
<link rel="stylesheet" href="/pagefind/pagefind-ui.css">
|
||||
|
||||
<div id="search"></div>
|
||||
|
||||
<script src="/_pagefind/pagefind-ui.js"></script>
|
||||
<script src="/pagefind/pagefind-ui.js"></script>
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const ui = new PagefindUI({
|
||||
|
||||
Reference in New Issue
Block a user