Next.js app router + headless CMS - Next-sitemap not working #773
Unanswered
MarvingMoreton
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I have recently migrated to next app router, and it seems like next-sitemap is not working. The sitemap.xml is taking only some assets and the signin/signup roots. How come? Is there a part of the documentation for app router or not?
Here's my next-sitemap.config.js at the root:
/** @type {import('next-sitemap').IConfig} /
module.exports = {
siteUrl: process.env.SITE_URL || 'https://guadeloupeloc.fr/',
generateRobotsTxt: true,
robotsTxtOptions: {
policies: [
{
userAgent: '',
disallow: ['/slice-simulator', '/app/', '/404/']
},
{ userAgent: '', allow: '/' }
]
},
exclude: ['/slice-simulator', '/app/*', '/404/']
}
And I am just getting this in my sitemap-0.xml:
https://guadeloupeloc.fr/opengraph-image.png2024-02-26T00:16:17.435Zdaily0.7 https://guadeloupeloc.fr/icon.png2024-02-26T00:16:17.435Zdaily0.7 https://guadeloupeloc.fr/apple-icon.png2024-02-26T00:16:17.435Zdaily0.7 https://guadeloupeloc.fr/signin2024-02-26T00:16:17.435Zdaily0.7 https://guadeloupeloc.fr/signup2024-02-26T00:16:17.435Zdaily0.7Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions