Allow overriding Pagefind bundlePath in Starlight #3441
Replies: 2 comments
-
|
Hi @lawvs! This is our bug tracker, so I’ll convert this to a feature request discussion. We respect the But I’d be curious to hear more about the use cases that aren’t covered by that. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much for your response; the base configuration can effectively resolve this issue. Yet, I prefer the configuration of relative paths because it lets me avoid rewriting links with the subpath and keep the docs portable. Adding |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When deploying under a subpath (e.g., GitHub Pages project site), the search client requests Pagefind assets from /pagefind/... instead of /<project_name>/pagefind/. Example: https://www.waterwater.moe/fn-sphere/
Setting
BASE_URLcan fix this, but exposing bundlePath to thePagefindOptionswould make Starlight more robust for varied hosting setups.starlight/packages/starlight/components/Search.astro
Lines 142 to 145 in 5787485
Beta Was this translation helpful? Give feedback.
All reactions