fix(marketing): static rendering for docs/blog/changelog (DYNAMIC_SERVER_USAGE)#107
Merged
Conversation
…elog Docs, blog, and changelog pages threw DYNAMIC_SERVER_USAGE in production: the [locale] layout called getMessages() without setRequestLocale and had no locale generateStaticParams, so next-intl fell back to headers() and every prerendered route became dynamic at render time. - [locale]/layout: add generateStaticParams over LOCALES + setRequestLocale - docs/blog/changelog pages: thread locale param + setRequestLocale - blog/changelog generateStaticParams: map fumadocs string[] slug to the single [slug] segment (surfaced once prerender actually ran) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Give the primary CTA a transparent border so its box height matches the outlined GitHub button in the same row; remove leftover backdrop-blur. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Deployed marketing app logged repeated
DYNAMIC_SERVER_USAGEon docs (and blog/changelog) routes.Root cause: the
[locale]layout calledgetMessages()withoutsetRequestLocale, and had no localegenerateStaticParams. next-intl fell back toheaders(), which makes every prerendered route dynamic at render → throws during the Server Components render in production.Fix
[locale]/layout.tsx— addgenerateStaticParamsoverLOCALES+setRequestLocale(locale)beforegetMessages()(next-intl static-rendering opt-in).docs/[[...slug]],blog/[slug],changelog/[slug]pages — threadlocaleparam +setRequestLocale.blog/changeloggenerateStaticParams— map fumadocsstring[]slug down to the single[slug]segment. This latent mismatch only surfaced once prerender actually started running.Verify
pnpm --filter '*marketing*' run buildnow prerenders all docs/blog/changelog routes as static (●) for bothenandfr. Typecheck clean.🤖 Generated with Claude Code