Skip to content

fix(marketing): static rendering for docs/blog/changelog (DYNAMIC_SERVER_USAGE)#107

Merged
f-amine merged 2 commits into
masterfrom
fix/marketing-static-i18n
Jun 29, 2026
Merged

fix(marketing): static rendering for docs/blog/changelog (DYNAMIC_SERVER_USAGE)#107
f-amine merged 2 commits into
masterfrom
fix/marketing-static-i18n

Conversation

@f-amine

@f-amine f-amine commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Problem

Deployed marketing app logged repeated DYNAMIC_SERVER_USAGE on docs (and blog/changelog) routes.

Root cause: the [locale] layout called getMessages() without setRequestLocale, and had no locale generateStaticParams. next-intl fell back to headers(), which makes every prerendered route dynamic at render → throws during the Server Components render in production.

Fix

  • [locale]/layout.tsx — add generateStaticParams over LOCALES + setRequestLocale(locale) before getMessages() (next-intl static-rendering opt-in).
  • docs/[[...slug]], blog/[slug], changelog/[slug] pages — thread locale param + setRequestLocale.
  • blog/changelog generateStaticParams — map fumadocs string[] slug down to the single [slug] segment. This latent mismatch only surfaced once prerender actually started running.

Verify

pnpm --filter '*marketing*' run build now prerenders all docs/blog/changelog routes as static (●) for both en and fr. Typecheck clean.

🤖 Generated with Claude Code

f-amine and others added 2 commits June 28, 2026 00:52
…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>
@f-amine f-amine merged commit c2896bf into master Jun 29, 2026
3 checks passed
@f-amine f-amine deleted the fix/marketing-static-i18n branch June 29, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant