From 4cef29dd464123a48716f36a0012b657cb07795d Mon Sep 17 00:00:00 2001 From: Kevin Zuniga Cuellar Date: Fri, 12 Jan 2024 11:28:13 -0500 Subject: [PATCH 01/16] extend config options to pagefind --- packages/starlight/components/Search.astro | 21 +++++++++++++++++-- .../starlight/utils/createPathFormatter.ts | 5 +++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/starlight/components/Search.astro b/packages/starlight/components/Search.astro index 2b5f3ac495e..250f8c00588 100644 --- a/packages/starlight/components/Search.astro +++ b/packages/starlight/components/Search.astro @@ -2,6 +2,7 @@ import '@pagefind/default-ui/css/ui.css'; import Icon from '../user-components/Icon.astro'; import type { Props } from '../props'; +import project from 'virtual:starlight/project-context'; const { labels } = Astro.props; @@ -13,9 +14,18 @@ const pagefindTranslations = { .map(([key, value]) => [key.replace('pagefind.', ''), value]) ), }; + +const configOptions = { + format: project.build.format, + trailingSlash: project.trailingSlash, + addBase: false, +}; --- - +