Include dynamically rendered pages in sitemap #812
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
manifest.routes.staticRoutes
toallKeys
increateUrlSet
.Just taking a very naive stab at this, not sure this is even the right part of the manifest to pull these dynamically rendered paths from but I found my missing pages inside of it. This seems to pick up some of the pages that went missing as soon as I called
headers()
orcookies()
fromimport { headers, cookies } from 'next/headers';
in my page or layout.Opting into dynamic rendering seems to put the page in a different place in the build output manifest:
https://nextjs.org/docs/app/api-reference/functions/headers
Does this approach seem like a good direction? Any feedback? Just trying to start a conversation and hopefully solve #692 and #743.
Looks like there was an earlier attempt at #759.
I'm testing with Next v14.2.3 and patched next-sitemap v4.2.3 locally to test.