That definitely doesn't work right since Astro.site doesn't include the base path configuration. π
It appears to maybe build the right HTML if I specifically include the base path in my site configuration instead of in the base configuration, e.g. npx astro build --site "http://localhost:3000/docs"
But it definitely doesn't preview correctly:
npx astro preview --site "http://localhost:3000/docs"
The site configuration value includes a pathname of /docs/ but there is no base configuration.
...
Local http://localhost:3000/
but then the links include /docs, so they all 404. π’
I also tried instead previewing with base:
npx astro preview --base "/docs"
...
Local http://localhost:3000/docs/
Then the links work correctly, but all of the built assets like CSS fail to load. π
For completeness, I also tried specifying both the --site (with base) and --base in the preview but that produced the same behavior as only specifying the base I guess?
npx astro preview --site "http://localhost:3000/docs" --base "/docs"
...
Local http://localhost:3000/docs/
Again, links work but built assets like CSS fail.