From d5ec1f2d72ae8dd6f2c510bd1647d70515abaed0 Mon Sep 17 00:00:00 2001 From: Joe Kendall Date: Fri, 17 Nov 2023 11:41:44 -0500 Subject: [PATCH] fixing the pagefind content index and also changing the output subdir to something other than "pagefind" because that breaks the content urls for some reason (#54) Co-authored-by: Joe Kendall --- astro.config.mjs | 2 +- lib/astro-pagefind/pagefind.ts | 2 ++ pagefind.yml | 2 -- src/components/Search.astro | 10 +++++----- src/layouts/Doc.astro | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 pagefind.yml diff --git a/astro.config.mjs b/astro.config.mjs index 1b89fc3..0d3f48a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,5 +9,5 @@ export default defineConfig({ assets: 'assets/docs/_astro' }, - integrations: [tailwind(), pagefind({site: 'dist', outputSubdir: 'assets/docs/pagefind'})] + integrations: [tailwind(), pagefind({site: 'dist', outputSubdir: 'assets/docs/pf'})] }) diff --git a/lib/astro-pagefind/pagefind.ts b/lib/astro-pagefind/pagefind.ts index 028fdfc..ab83b23 100644 --- a/lib/astro-pagefind/pagefind.ts +++ b/lib/astro-pagefind/pagefind.ts @@ -13,6 +13,8 @@ export default function pagefind(pagefindConfig: { site?: string; outputSubdir?: process.env.PAGEFIND_SITE = site let outDir: string; + + return { name: "pagefind", hooks: { diff --git a/pagefind.yml b/pagefind.yml deleted file mode 100644 index c17a629..0000000 --- a/pagefind.yml +++ /dev/null @@ -1,2 +0,0 @@ -site: distoooooo -output_subdir: assets/docs/pagefind diff --git a/src/components/Search.astro b/src/components/Search.astro index 2c45c17..b571fa7 100644 --- a/src/components/Search.astro +++ b/src/components/Search.astro @@ -9,11 +9,11 @@ const {id} = Astro.props