NuxtN
Nuxt2y ago
Joshua

Dynamic Sitemap Generation not working in production

In my nuxt.config.ts I have the following, where the URL endpoint returns an array of correctly formatted sitemap objects. I know this because when running the site locally with
npm run dev
it works great. I know this because in localhost I can see 3615 URL's pulled from the production API.

    sitemap: {
      sources : [
          'https://api.mcmodels.net/urls'
      ],
        cacheMaxAgeSeconds: 3600,
        xslColumns: [
            { label: 'URL', width: '50%' },
            { label: 'Last Modified', select: 'sitemap:lastmod', width: '25%' },
            { label: 'Priority', select: 'sitemap:priority', width: '12.5%' },
            { label: 'Change Frequency', select: 'sitemap:changefreq', width: '12.5%' },
        ],
    },


That same code is being ran full SSR on the production site at https://mcmodels.net/sitemap.xml yet it's not pulling any of the dynamic URLs.
image.png
image.png
Was this page helpful?