Describe the bug
describe the bug
the production build uses yarn 4, but sitemap generation is configured
as a postbuild script.
yarn 4 does not execute arbitrary post<user-script> hooks, so
next-sitemap is not run after yarn build.
as a result, the deployed site is missing its generated sitemap.
actual behavior
sitemap.xml is not generated and https://json-schema.org/sitemap.xml
returns 404.
possible fix
invoke next-sitemap explicitly as part of the build command or as an
explicit ci/deployment step.
Steps To Reproduce
- run
corepack enable
- run
yarn install
- run
yarn build
- inspect the
out directory
- visit https://json-schema.org/sitemap.xml
Expected Behavior
the production build should generate sitemap.xml and the corresponding
robots configuration.
Screenshots
No response
Device Information [optional]
- OS:
- Browser:
- version:
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No
Describe the bug
describe the bug
the production build uses yarn 4, but sitemap generation is configured
as a
postbuildscript.yarn 4 does not execute arbitrary
post<user-script>hooks, sonext-sitemapis not run afteryarn build.as a result, the deployed site is missing its generated sitemap.
actual behavior
sitemap.xmlis not generated and https://json-schema.org/sitemap.xmlreturns 404.
possible fix
invoke
next-sitemapexplicitly as part of the build command or as anexplicit ci/deployment step.
Steps To Reproduce
corepack enableyarn installyarn buildoutdirectoryExpected Behavior
the production build should generate
sitemap.xmland the correspondingrobots configuration.
Screenshots
No response
Device Information [optional]
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No