diff --git a/.changeset/silver-dots-guess.md b/.changeset/silver-dots-guess.md new file mode 100644 index 0000000000..f5ea350668 --- /dev/null +++ b/.changeset/silver-dots-guess.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': patch +--- + +Correctly format Pagefind search result links when `trailingSlash: 'never'` is used diff --git a/package.json b/package.json index 1d7e1870b8..40eee078c1 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ { "name": "/_astro/*.js", "path": "examples/basics/dist/_astro/*.js", - "limit": "22 kB" + "limit": "22.5 kB" }, { "name": "/_astro/*.css", diff --git a/packages/starlight/components/Search.astro b/packages/starlight/components/Search.astro index 2b5f3ac495..ec53fc3e8b 100644 --- a/packages/starlight/components/Search.astro +++ b/packages/starlight/components/Search.astro @@ -1,6 +1,7 @@ --- import '@pagefind/default-ui/css/ui.css'; import Icon from '../user-components/Icon.astro'; +import project from 'virtual:starlight/project-context'; import type { Props } from '../props'; const { labels } = Astro.props; @@ -15,7 +16,10 @@ const pagefindTranslations = { }; --- - +