vite-pages-theme-doc is the official documentation theme for vite-plugin-react-pages, providing a ready-to-use template for building documentation sites with React and Vite. Current version is 5.0.0, released alongside vite-plugin-react-pages v5. It features built-in navigation, sidebar, search, and code highlighting. Differentiates from generic doc tools by tight integration with Vite's HMR and plugin ecosystem, and is optimized for React documentation projects. Ships TypeScript types. Development is active with updates tied to the vite-plugin-react-pages lifecycle.
npm install vite-pages-theme-docNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows installation, Vite config with theme, and basic page setup for a documentation site.
Upgrade vite-plugin-react-pages to 5.x.
Import types and hooks from 'vite-pages-theme-doc/client'.
Replace basicLayout with slot components from 'vite-pages-theme-doc/client'.
Ensure React and react-dom versions are 18 or higher.
Follow the documented page file naming convention (e.g., pages/foo/bar.page.tsx).
Run npm install vite-pages-theme-doc and ensure it's in package.json dependencye.
Change to 'import DocTheme from 'vite-pages-theme-doc''.
Ensure the theme is imported and passed to the config: theme: DocTheme.
Create a page file with .page.tsx extension in the pages directory.