New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting Astro build.format
config breaks sidebar links
#180
Comments
Thanks for the report @jamescmartinez! I can confirm we’re not currently respecting Our general method for making user configuration from starlight/packages/starlight/index.ts Lines 85 to 94 in 7f4e948
We currently expose the project import project from 'virtual:starlight/project-context';
const link = project.build.format === 'file' ? '/foo.html' : '/foo/'; |
I didn't have time to wrap this up tonight, but here's a start: #207 |
I would like to take a swing at this one 🚀 |
What version of
starlight
are you using?0.1.2
What version of
astro
are you using?2.6.1
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
Expected: sidebar links should not have a trailing slash when setting Astro's build.format config to
file
Actual: they have a trailing slash, which causes the links to 404 in production builds
How to reproduce:
build-format-file
branch of this repo/docs
(sorry, it's a temporary workaround for GitHub pages)npm run dev
to see the trailing/
ORnpm run build && npm run preview
to get the 404sLink to Minimal Reproducible Example
https://github.com/mergentlabs/docs/tree/build-format-file
Participation
The text was updated successfully, but these errors were encountered: