Adding a new page is adding a new MDX file. Webpack only compiles the dynamic route, not each content page.
MDX supports any React component. Each landing page can have its own hero, grid, comparison, CTA — fully custom.
Content lives in content/landing/. Diffs in pull requests, version
controlled, no CMS needed yet.
Before this refactor, every content page was an independent page.tsx file — a
separate webpack entry point. 491 routes × webpack baseline cost = 18GB+ RAM
during build.
After: one dynamic route handles hundreds of MDX files. Build stays at 6-8GB regardless of how many landing pages we add.
Create content/landing/blog/my-page.mdx with frontmatter + content.
Commit and push. Fumadocs picks it up automatically.
Access /lp/blog/my-page — served by the shared dynamic route.
| Feature | MDX + Dynamic Route | Hardcoded page.tsx |
|---|---|---|
| Build cost scales with page count | ||
| Unique design per page | ||
| Version controlled | ||
| Adds webpack entry per page | ||
| Supports React components |