search bar timeeee

This commit is contained in:
2026-09-11 11:46:47 -07:00
parent d8049a1f34
commit 58da634ec7
10 changed files with 238 additions and 10 deletions
+7
View File
@@ -6,6 +6,7 @@ import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
import { attrs } from "@mdit/plugin-attrs";
import { chunk } from "lodash-es";
import path from "node:path";
import { execSync } from 'child_process';
import pluginFilters from "./_config/filters.js";
@@ -136,6 +137,12 @@ export default async function(eleventyConfig) {
/* Watch when serving */
eleventyConfig.addWatchTarget("css");
eleventyConfig.addWatchTarget("js");
/* Implement search */
/* From https://rknight.me/blog/using-pagefind-with-eleventy-for-search/ */
eleventyConfig.on('eleventy.after', () => {
execSync(`npx pagefind --site _site --glob \"**/*.html\"`, { encoding: 'utf-8' })
});
};
export const config = {