Open davidguo12345 opened 1 week ago
I also not able to get starlight
to work in astro build
with base
.
I'm using the latest (0.28.2
), and I have tried both build.format: 'file' | 'directory'
:
export default defineConfig({
// neither of these work with `starlight`
base: ...,
vite: {
base: ...
},
integrations: [
starlight({
sidebar: [
{
label: 'Getting Started',
items: [{
slug: 'guides/getting-started' // the resulting link is not adjusted
}]
}
]
)}
]
})
related: https://github.com/withastro/astro/pull/5693#issuecomment-2372620390
What version of
starlight
are you using?0.28.2
What version of
astro
are you using?4.15.8
What package manager are you using?
pnpm, npm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
When 'base' is set in 'astro.config.mjs' to a subpath such as 'some/path/', and when 'build.format' is 'file', the headers on generated doc pages will link to 'some/path.html' instead of 'some/path/index.html' as expected. This same issue does not occur if we set 'base' for vite in 'astro/config.mjs' via:
Example document structure:
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-tcvntm?file=astro.config.mjs
Participation