Closed maximilian-schwarz closed 2 years ago
Hey @maximilian-schwarz - we're in the process of rewriting the plugin for Craft 4, so we'll absolutely consider this.
In the meantime, certainly with NextJS, you can use rewrites to map to the URL of your craft install.
Something like this:
async rewrites() {
return [
{
source: '/sitemap.xml',
destination: `${process.env.ADMIN_URL}/sitemap.xml`,
},
{
source: '/sitemap:path.xml',
destination: `${process.env.ADMIN_URL}/sitemap:path.xml`,
},
{
source: '/robots.txt',
destination: `${process.env.ADMIN_URL}/robots.txt`,
},
];
},
Thanks for the tip 👍🏻
Description
I think it's very important to have the possibility get the sitemap via Graphql to generate a sitemap.xml for headless project wiht NuxtJS oder NextJS.
Maybe the response can look like this: