Skip to content

Commit

Permalink
fixing the pagefind content index and also changing the output subdir…
Browse files Browse the repository at this point in the history
… to something other than "pagefind" because that breaks the content urls for some reason (#54)

Co-authored-by: Joe Kendall <[email protected]>
  • Loading branch information
1800joe and software-person authored Nov 17, 2023
1 parent 26d53cc commit d5ec1f2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'})]
})
2 changes: 2 additions & 0 deletions lib/astro-pagefind/pagefind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export default function pagefind(pagefindConfig: { site?: string; outputSubdir?:
process.env.PAGEFIND_SITE = site

let outDir: string;


return {
name: "pagefind",
hooks: {
Expand Down
2 changes: 0 additions & 2 deletions pagefind.yml

This file was deleted.

10 changes: 5 additions & 5 deletions src/components/Search.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const {id} = Astro.props
<style is:global>

:root {
--pagefind-ui-background: #334155;
--pagefind-ui-primary: #eeeeee;
--pagefind-ui-text: #eeeeee;
--pagefind-ui-border: #334155;
--pagefind-ui-tag: #000;
--pagefind-ui-background: #334155 !important;
--pagefind-ui-primary: #eeeeee !important;
--pagefind-ui-text: #eeeeee !important;
--pagefind-ui-border: #334155 !important;
--pagefind-ui-tag: #000 !important;
}


Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Doc.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { content = {}, headings } = Astro.props
---

<Layout data={content}>
<main class="lg:col-span-6 col-span-12">
<main class="lg:col-span-6 col-span-12" data-pagefind-body>
<article>
<header>
<h3 class="text-xs font-mono uppercase text-fuchsia-500">
Expand Down

0 comments on commit d5ec1f2

Please sign in to comment.