Skip to content

fix(website): force-static docs pages so components prerender - #4090

Closed
Adebesin-Cell wants to merge 1 commit into
v6from
fix/docs-force-static
Closed

Adebesin-Cell wants to merge 1 commit into
v6from
fix/docs-force-static

Conversation

@Adebesin-Cell

Copy link
Copy Markdown
Collaborator

📝 Description

Fixes the docs site 500ing on component pages in production. /docs/[...slug] is opted into static generation so every page prerenders.

⛳️ Current behavior

The route has generateStaticParams returning all pages (confirmed: 54 components × 4 frameworks), but under the default dynamic = 'auto' Next prerendered only a couple of component pages (fieldset, overview) and served the rest on demand (ƒ). Those dynamically-rendered pages 500 in the Vercel runtime, so every component page (dialog, tabs, navigation-menu, …) returned a server error. It worked in next dev and even in a local next start, which is why it only showed up on the deploy.

🚀 New behavior

export const dynamic = 'force-static' on the docs route. All 216 component pages now prerender to static HTML (verified: dialog.html, navigation-menu.html, … exist; served with x-nextjs-prerender: 1, x-nextjs-cache: HIT, 200). No page needs per-request data — the content is fully static — so forcing static is safe and also makes the docs faster.

🧩 Frameworks

  • Not framework-specific

💣 Is this a breaking change (Yes/No): No

✅ Checklist

  • Added a changeset for user-facing changes
  • Added or updated tests
  • Added an example for any new prop or part
  • Updated the docs

📝 Additional information

Diagnosed by instrumenting generateStaticParams (it returns all 54 components) and rebuilding with dynamic = 'error', which built cleanly and prerendered all 216 pages — proving the pages are static-capable and auto was needlessly demoting them. force-static is the safe production directive; error would also work and would additionally fail the build if a docs page ever became dynamic again.

@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ark-docs Ready Ready Preview Sep 19, 2026 5:03am UTC

Request Review

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adebesin-Cell has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Adebesin-Cell

Adebesin-Cell commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #4091. force-static was a workaround

@Adebesin-Cell
Adebesin-Cell deleted the fix/docs-force-static branch September 19, 2026 05:17
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