Closed liyasthomas closed 5 years ago
sitemap.xml generated from Travis CI build
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>
http://travis-job-1c77f852-f86a-4ec6-8538-7abaa8d83c7f/settings
</loc>
</url>
<url>
<loc>
http://travis-job-1c77f852-f86a-4ec6-8538-7abaa8d83c7f/websocket
</loc>
</url>
<url>
<loc>
http://travis-job-1c77f852-f86a-4ec6-8538-7abaa8d83c7f/
</loc>
</url>
</urlset>
See the route locations are relative to build environment rather than base path.
I have checked your nuxt config and you build on spa
mode.
In spa
and generate
mode, the "hostname" option is mandatory, because on build time nuxt can't know your final hostname. It can do it only on universal mode thanks to a Node.js server.
see doc: https://github.com/nuxt-community/sitemap-module#hostname-optional---string
I just created a PR to fix your config: https://github.com/liyasthomas/postwoman/pull/177
Thanks for the quick PR 🚀 Issue has been fixed and hence closing.
Version
2.0
Reproduction link
https://postwoman.io/sitemap.xml
Steps to reproduce
What is expected ?
Routes should be relative to base path and not relative to build environment.
What is actually happening?
Instead of base path, build environment is considered as the root and /pages/routes are set relative to build enironment