Documentation
supastarter for Nuxtsupastarter for NuxtSEO

Sitemap

Learn how to generate a sitemap for your supastarter app.

The sitemap is a file that lists all the pages of your app. It's essential for SEO, as it helps search engines understand your app and its pages.

The sitemap of your supastarter application is automatically generated by the @nuxtjs/seo module, which is included in the marketing app.

The module auto-discovers your pages and generates the sitemap at /sitemap.xml.

Configuration

The SEO module is configured in the marketing app's nuxt.config.ts:

apps/marketing/nuxt.config.ts
export default defineNuxtConfig({
  modules: ["@nuxtjs/seo"],
  site: {
    url: process.env.NUXT_PUBLIC_SITE_URL,
  },
  robots: {
    allow: "*",
  },
});

Adding dynamic routes

If you have dynamic routes (like blog posts or legal pages), the Nuxt Content module automatically adds them to the sitemap.

For custom dynamic routes, you can configure the sitemap in the nuxt.config.ts:

apps/marketing/nuxt.config.ts
export default defineNuxtConfig({
  sitemap: {
    sources: [
      // add custom dynamic route sources here
    ],
  },
});

Learn more about sitemap configuration in the Nuxt SEO module documentation.