withastro / starlight

🌟 Build beautiful, accessible, high-performance documentation websites with Astro
https://starlight.astro.build
MIT License
5.05k stars 532 forks source link

Pagefind incorrect urls when built #674

Closed Tanhe closed 1 year ago

Tanhe commented 1 year ago

What version of starlight are you using?

0.9.0

What version of astro are you using?

3.0.6

What package manager are you using?

npm

What operating system are you using?

Windows

What browser are you using?

Chromium (Edge)

Describe the Bug

Starting from a brand new project.

npm run build

npm run preview

When you select the search box the page fails to load the pagefind scripts as it's looking for _pagefind/ but the dist folder has pagefind/.

image

image

Looking at this it might be this hardcoded bundlePath in Search.astro:

image

As a separate note, the build issues this warning:

image

There is a required change necessary here in index.ts:

image ^^ --source changed to --site makes the warning go away

Link to Minimal Reproducible Example

No response

Participation

delucis commented 1 year ago

Closed in #676!