When using generate with dynamic routes you return the routes as an array of string URLs which the sitemap module picks up and creates a correct sitemap.xml. However, if you return the routes object from generate to use the payload feature, the sitemap will fail because it expects a string instead of an object.
Make it so sitemap can use generate.routes
when using payloads. Should be updated to also accept routes in the form of:
[
{
route: 'urlstring',
payload: {data object},
...
}
]
and extract the route.
Hi @Jered
Thanks for your request ๐
Can you create and share a simple Nuxt project to reproduce the payload issue, please?
This will help to test a fix.