Guide
Docusaurus vs VitePress vs Nextra vs Starlight 2026



Compare Docusaurus, VitePress, Nextra, and Starlight for building documentation sites. React vs Vue, MDX support, versioning, search, and Algolia integration.
Contents
Contents
TL;DR
Keep Docusaurus if supported releases depend on its versioned docs and sidebars. Move to VitePress for Markdown with Vue examples, Nextra for MDX under a Next.js App Router deployment, or Starlight for an independent Astro docs collection. Before moving, take one old release, one interactive example, and one translated page through the new build. Confirm that a link from an old support ticket still opens the right instructions.
Key Takeaways
- A docs migration changes how files become routes and how embedded components render. Count those changes before you count pages.
- Export the paths you actually publish. Docusaurus can serve the latest release at an unversioned path and the current work under another path.
- Move a complete section in the pilot. The section's index, child pages, sidebar, links, and search results should agree on the same version and locale.
Feature Comparison
| Framework | Who controls the route | What to inspect before moving |
|---|---|---|
| Docusaurus | The docs plugin maps current and versioned content | Release snapshots, their sidebars, and React components |
| VitePress | The Markdown tree maps to static HTML paths | Vue components and directives, extensionless URLs, and host behavior |
| Nextra | The Next.js App Router and Nextra content conventions | The app route, page map, and shared MDX component mapping |
| Starlight | The Astro docs collection maps content to paths | Collection frontmatter, slug overrides, and component imports |
Docusaurus
With Docusaurus versioning, versioned_docs, versioned_sidebars, and versions.json record the published snapshots. The latest release can own the public /docs/ paths while the development docs use /docs/next/. Capture live paths alongside the source inventory. The directory name alone cannot tell you where a reader lands. MDX pages can also depend on React components from @theme/MDXComponents, so check theme-provided components as well as imports at the top of a page. Versioning · MDX and React
VitePress
VitePress maps Markdown files to HTML and supports Vue components in Markdown. For a move from Docusaurus, start by finding components that make examples work. Map a React demo to a Vue demo or preserve its explanation as a code sample. During preview, open a nested page by its old URL before trying navigation from the home page. Check how your host serves the resulting HTML and whether you need to preserve a file suffix or an extensionless path. VitePress v1 Vue authoring · VitePress v1 routing
This Vue fragment illustrates what a migrated interactive control can look like in a Markdown page. Use it as a model when you replace the equivalent React example.
<script setup>
import { ref } from 'vue'
const count = ref(0)
</script>
<button type="button" @click="count++">Count: {{ count }}</button>
Nextra
Nextra v4 can gather MDX under App Router page.mdx files or from a content tree. Its generated page map and co-located _meta files are inputs to docs navigation. Pick the route convention first, then rebuild the sidebar for one section. For example, a /docs/setup target in the app layout can use app/docs/setup/page.mdx. Use the old sidebar as an inventory of landing pages, labels, and entries that should remain hidden. Nextra file conventions
Starlight (Astro)
Starlight uses Markdown or MDX in src/content/docs/. Subdirectories contribute path segments. An example file at src/content/docs/setup/proxy.mdx contributes the path segments setup/proxy before any locale or base-path prefix. Verify the trailing slash on the deployment host. Check the old components individually. A file that still ends in .mdx may import a component or theme helper that only exists in the old project. Starlight's guide to pages
Migration Guide
Build a route map before copying files
Start with a support link and the routes a reader might confuse with it. The following example is illustrative. Replace the candidate paths with the paths your preview actually serves.
| Existing URL | Candidate URL | What must survive |
|---|---|---|
/docs/1.8/setup#configure-proxy | /manual/1.8/setup#configure-proxy | The old configuration steps and the exact heading ID |
/docs/setup | /manual/setup | The latest release and its setup commands |
/fr/docs/1.8/setup | /fr/manual/1.8/setup | The French instructions for the old release |
Record a decision for each row. Preserve a path, add a redirect, or serve an archived page. A heading fragment is handled by the browser, so an HTTP status check alone cannot prove that the old bookmark works. Click the link in a browser and verify where the page scrolls. If the same slug exists in two releases, verify the commands on both pages. Repeat the checks from the sidebar and from search so readers reach the same destination by each route.
Versioned Documentation and i18n Support
Use a French page from a supported older release as the migration fixture. Give it a distinctive command so an accidental match from the current manual is easy to spot.
| Destination | Preserve the archive and language | Rebuild or recrawl |
|---|---|---|
| Docusaurus | Migrate the release snapshot, its sidebar and the translated content together. Open the French URL for the older release directly. Version snapshots · Internationalization | With Algolia DocSearch, check that contextual filters on that page return the intended language and release. Contextual search |
| VitePress | Place the translated fixture in the matching locale subdirectory. Preserve the release segment in the content tree or keep the old manual deployed at its original path. Locale routing | If you choose local search, rebuild the site with its MiniSearch provider. Search for the command from the archived French page. Default-theme search |
| Starlight | Decide whether to keep the old release deployed separately or trial the community versioning plugin. Remove a trial translation and check the default-language fallback and translation notice. Versioning plugin · Fallback content | Rebuild the prerendered archive and confirm Pagefind can find the old command. Pagefind configuration |
| Nextra v4 | Keep the release URL in the route map and verify the locale-prefixed route on your host. Nextra’s documented middleware redirect approach does not work for a statically exported i18n site. Test any hosting redirect separately. Nextra internationalization | Run the Pagefind postbuild for the output you deploy and follow a French result into the old release. Search indexing |
Treat version and language as separate inputs to the route map. Decide which translations exist for each supported release. Then document what a language switch should do when a translation is absent. Keep the archived link available if support still sends customers to the old manual. Confirm that a reader switching languages or following a redirect keeps the intended release.
Search Integration: Algolia vs Local Solutions
Docusaurus documents Algolia DocSearch and contextual filters for version and language. If your old site uses that integration, test its replacement with an error string that appears in two releases. For a hosted index, check the paths and metadata the crawler picked up after the cutover. For a local index, check whether the deployed build contains both versions and the search result opens the correct one. Test again after redirects are in place. Docusaurus search documentation
When to Use Each
Keep Docusaurus when release snapshots and React demos already work. Keep VitePress when Vue examples and static hosting fit the manual. Keep Nextra when product and docs routes already share a deployment with clear ownership. Keep Starlight when the docs team can publish and maintain the Astro site independently. For a migration, start with the part that is failing today. The first move should let a maintainer carry over a real section and show that its readers can still find and use it.
Methodology
The comparison uses maintainer documentation to identify which files, components, and build outputs a migration must account for. The route map is a migration example. Use it with your actual URLs, release policy, and index to make the decision.
Related guides
- Compare Docusaurus and VitePress packages on PkgPulse.
- Use the Fumadocs, Nextra, and Starlight product-docs guide if the move changes the relationship between docs and the product app.
- See Vite vs webpack and Turbopack vs Vite when you need to review the build tools separately.