You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 references the style.xsl file using an absolute path:
This means that when we have a project that has a subdirectory structure, it cannot find the file because it is looking for https://example.com/__sitemap__/style.xsl
instead of https://example.com/subdirectory/__sitemap__/style.xsl
Maybe the href could be a relative path or perhaps use app.baseURL?
In the reproduction:
npm run dev (and go to /subdirectory/sitemap.xml)
or
npm run generate
npm run serve (and go to /subdirectory/sitemap.xml)
The text was updated successfully, but these errors were encountered:
hbanham
changed the title
Reference to sitemap style.xsl file doesn't work when using a subdirectory
Reference to style.xsl file doesn't work when using a subdirectory
Mar 21, 2023
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 references the style.xsl file using an absolute path:
![image](https://user-images.githubusercontent.com/61966716/226675598-698cb8f5-448d-49b5-8eea-c2f3c65cf7af.png)
This means that when we have a project that has a subdirectory structure, it cannot find the file because it is looking for
https://example.com/__sitemap__/style.xsl
instead of
https://example.com/subdirectory/__sitemap__/style.xsl
Maybe the href could be a relative path or perhaps use app.baseURL?
In the reproduction:
npm run dev
(and go to /subdirectory/sitemap.xml)or
npm run generate
npm run serve
(and go to /subdirectory/sitemap.xml)Thank you!
Reproduction
https://stackblitz.com/edit/nuxt-starter-wuerx5
System / Nuxt Info
The text was updated successfully, but these errors were encountered: