harlan-zw / nuxt-seo

The complete SEO solution for Nuxt.
https://nuxtseo.com
1.03k stars 64 forks source link

How to add prefix for the sitemap.xml path #207

Closed anjali89r closed 2 months ago

anjali89r commented 6 months ago

Details

I have a blogs project that is going to separate from the existing website and want to generate the sitemap.xml for this blogs project as this example.com/blogs/sitemap.xml Is this possible with the sitemap module now ?

harlan-zw commented 6 months ago

Hi, it sounds like you should be using the Nuxt baseURL option?

export default defineNuxtConfig({
  app: {
    baseURL: '/blogs'
  }
})

The sitemap module should emit the correct paths from there.