🔥 All-Access Pass — $199 USD (Regular $499) · Unlock all 2,836 Astro themes ➔
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
Comparisons••By Komal Nakrani

Starlight vs VitePress: Which Docs Framework to Pick

Starlight vs VitePress compared: Astro vs Vue, search, i18n, customisation, performance and hosting. Clear guidance on which documentation tool fits your team.

#Astro#Starlight#VitePress#Documentation#Comparison

In the Starlight vs VitePress decision, pick Starlight if you want a docs site that ships minimal JavaScript, includes full-text search and translations out of the box, and can grow into a larger Astro site with any UI framework. Pick VitePress if your team works in Vue, you want Vue components directly in Markdown, and you like app-style navigation between pages. Both are fast, Markdown-first and built on Vite; the main difference is Astro’s islands versus a Vue single-page app.

Starlight is the official documentation framework from the Astro team. VitePress comes from the Vue team and powers the docs for Vue, Vite and many other projects. Neither is a bad choice, so the decision usually comes down to your stack and how much the docs need to do.

Key Takeaways

  • Starlight is an Astro integration. VitePress is a Vue-powered static site generator.
  • Starlight pages ship very little JavaScript. VitePress hydrates a Vue app and then navigates client-side.
  • Both include local search: Starlight uses Pagefind, VitePress uses MiniSearch, and both support Algolia DocSearch.
  • Starlight lets you use React, Vue, Svelte, Solid or Astro components in docs; VitePress uses Vue components.
  • Starlight docs live in a regular Astro project, so marketing pages, a blog and server routes can sit alongside them.

Starlight vs VitePress at a glance

Starlight VitePress
Built on Astro (Vite under the hood) Vite and Vue 3
Content Markdown, MDX, Markdoc in src/content/docs/ Markdown with Vue in .md files
Client JS Minimal; islands only where you add them Vue runtime plus app hydration
Navigation Full page loads (optional view transitions) Client-side SPA navigation
Search Pagefind built in; Algolia via plugin Local MiniSearch built in; Algolia supported
i18n Built in, with UI strings for many languages Built in, locale configuration
Components Astro components plus any island framework Vue components
Code blocks Expressive Code (frames, diff markers, titles) Shiki with line highlights and focus
Extensibility Starlight plugins, Astro integrations, component overrides Theme extension with Vue, Vite plugins
Non-docs pages Any Astro page in the same project Custom layouts, or layout: page

Setup and project structure

Starlight starts from a template:

npm create astro@latest -- --template starlight

Configuration lives in astro.config.mjs. The sidebar can be written by hand or generated from folders:

// astro.config.mjs
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

export default defineConfig({
  integrations: [
    starlight({
      title: 'Acme Docs',
      sidebar: [
        { label: 'Start here', items: ['getting-started', 'installation'] },
        { label: 'Guides', autogenerate: { directory: 'guides' } },
        { label: 'Reference', autogenerate: { directory: 'reference' } },
      ],
    }),
  ],
});

Docs are a content collection, so frontmatter is validated:

// src/content.config.ts
import { defineCollection } from 'astro:content';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';

export const collections = {
  docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
};

VitePress starts with npx vitepress init, which creates a .vitepress/config.mts file next to your Markdown:

// docs/.vitepress/config.mts
import { defineConfig } from 'vitepress';

export default defineConfig({
  title: 'Acme Docs',
  themeConfig: {
    nav: [{ text: 'Guide', link: '/guide/getting-started' }],
    sidebar: {
      '/guide/': [
        { text: 'Start here', items: [
          { text: 'Getting started', link: '/guide/getting-started' },
          { text: 'Installation', link: '/guide/installation' },
        ] },
      ],
    },
    search: { provider: 'local' },
  },
});

VitePress sidebars are written by hand (community plugins can generate them). Starlight’s autogenerate reads folder structure and frontmatter sidebar options, which saves time on large docs.

Writing docs: Markdown, MDX and components

Both support callout containers with similar syntax. Starlight uses :::note, :::tip, :::caution and :::danger asides. VitePress uses ::: info, ::: tip, ::: warning and ::: danger. Both support code groups or tabs, badges and frontmatter-driven page options.

The difference shows up with components. In VitePress, every Markdown file is a Vue component, so you can import and use Vue directly:

<!-- docs/guide/demo.md (VitePress) -->
<script setup>
import Counter from '../components/Counter.vue'
</script>

# Demo

<Counter />

In Starlight, you use MDX (or Markdoc) and can import Starlight’s built-in components or your own, written in Astro or any framework you have added:

---
# src/content/docs/guides/demo.mdx
title: Demo
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
import Counter from '../../../components/Counter.tsx';

<Tabs>
  <TabItem label="npm">npm install acme</TabItem>
  <TabItem label="pnpm">pnpm add acme</TabItem>
</Tabs>

<Counter client:visible />

If your component library is Vue, VitePress is the more natural fit. If it is React or mixed, Starlight avoids rewriting anything.

Performance and navigation

Starlight renders each page to static HTML and ships only small scripts for features like search, theme switching and tabs. Pages load fast on slow devices, and there is no framework runtime to hydrate.

VitePress also renders static HTML for the first load, then hydrates a Vue app so later navigation happens client-side and feels instant. The cost is the Vue runtime and hydration on first visit. For docs where readers jump between many pages in one session, that trade-off is reasonable. For docs where most visitors land from search on a single page, Starlight’s approach usually sends less JavaScript.

Both score well in practice. If performance is the deciding factor, build one representative page in each and compare on a throttled mobile profile.

Search, i18n and features

Search. Starlight runs Pagefind after the build, indexing the final HTML with no external service. VitePress has a built-in local search using MiniSearch. Both support Algolia DocSearch for larger sites.

Internationalisation. Both handle multiple locales with per-locale folders. Starlight ships translated UI strings for many languages and shows a fallback notice when a page is not yet translated. VitePress supports locales with per-locale theme configuration.

Code blocks. Starlight uses Expressive Code, which adds editor and terminal frames, file name titles, diff markers and copy buttons. VitePress uses Shiki with line highlighting, focus, diff markers and code groups.

Versioning. Neither has built-in docs versioning. Teams usually deploy separate versions to subpaths or use community plugins. If versioning is critical, that is a point for tools like Docusaurus; see Starlight vs Docusaurus.

Customisation and growing beyond docs

Starlight exposes component overrides: you can replace the header, sidebar, footer or any other part with your own Astro component, and plugins can add features such as blogs, link validation or API references. Because Starlight is an Astro integration, you can add a marketing homepage, a pricing page or server-rendered routes in src/pages/ of the same project.

VitePress customisation happens by extending the default theme with Vue: layout slots, custom components and CSS variables. You can build custom pages, but the project stays a docs-oriented Vue app. For many open-source libraries, that is exactly what they want.

If you are unsure whether you need a dedicated docs framework at all, the Astro or Starlight for docs guide covers when plain Astro is enough.

Hosting

Both build to static files and deploy anywhere: Cloudflare Pages, Netlify, Vercel or GitHub Pages. Starlight builds to dist/; VitePress to .vitepress/dist by default. The Astro static hosting docs cover the Starlight side.

When to choose Starlight and when to choose VitePress

Choose Starlight if:

  • Your team uses React, Svelte, Solid or plain HTML, or a mix.
  • Most readers land on one page from search, so first-load weight matters.
  • You want search, i18n and sidebar generation working with little configuration.
  • The docs may share a project with a marketing site or blog.

Choose VitePress if:

  • Your team and component library are Vue.
  • You want Vue components inline in Markdown without MDX.
  • You value SPA navigation for readers who browse many pages.
  • You are documenting a Vue or Vite ecosystem library and want docs that match its neighbours.

If you want a designed documentation site rather than the default Starlight look, Astro has options too: Starlight’s own theme plugins, free templates on astro.build/themes, and the Komal documentation themes, which are full Astro 7 projects.

FAQ

Is Starlight better than VitePress?

Neither is better across the board. Starlight ships less JavaScript and works with any UI framework; VitePress fits Vue teams and offers client-side navigation. Choose by stack and audience.

Does Starlight use Vue?

Not by default. Starlight is built on Astro, but you can add Vue with npx astro add vue and use Vue components in MDX pages as islands.

Can VitePress be used for a blog?

Yes, with custom layouts and a data loader that lists posts. It is not built in. Starlight can add a blog through community plugins, or you can build one with Astro content collections in the same project.

Which has better search, Starlight or VitePress?

Both have solid local search without a service. Starlight uses Pagefind, which indexes the final HTML and loads index chunks on demand. VitePress uses MiniSearch with a prebuilt index. Both support Algolia DocSearch for larger sites. See the Starlight docs and the VitePress docs for configuration.

Can I migrate from VitePress to Starlight?

Yes. Markdown content moves over with minor changes: convert containers to Starlight asides, rewrite inline Vue usage as MDX imports, and rebuild the sidebar config. Vue components still work if you add the Vue integration.