-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Incorrect URL's when using a subdirectory structure #13
Comments
Hey @hbanham Thanks for the detailed issue! I've pushed up v1.0.8 that should fix this |
Hey, thank you for the quick response! I'm sorry to say but the update hasn't fixed the generated output file for me, though the preview now looks correct: I've created a new StackBlitz reproduction, same as before but with version 1.0.8: |
Oops, you are right! I've pushed up a v1.0.9 fix, it also fixes an issue with nitro route rule matching. Updated stackblitz: https://stackblitz.com/edit/nuxt-starter-w8kega?file=nuxt.config.ts Sorry for the back and forth, hopefully it's all good now, let me know if not :) |
No worries at all, I really appreciate the fast response. |
Describe the bug
For websites that are hosted in a subdirectory, for example https://example.com/subdirectory/{files}
I configure Nuxt's baseURL and Nitro's publicDir to output the site files in the subdirectory required.
The sitemap.xml that is generated includes URL's without the subdirectory:
![image](https://user-images.githubusercontent.com/61966716/221901562-b2d115c4-7b0e-4486-adef-2576c2c33f61.png)
The last two URL's in my screenshot which include the subdirectory path are created by adding
<NuxtLink>
's that point to the pages.I think the first two URL's must be generated based on the page directory or something similar, which don't account for the subdirectory.
In the reproduction:
npm run generate
code .output/public/subdirectory/sitemap.xml
to view the sitemap file.Reproduction
https://stackblitz.com/edit/nuxt-starter-r74ewa
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: