@voidzero-dev/vitepress-theme
Shared VitePress theme for VoidZero projects, including VoidZero, Vite+, Vite, Vitest, Rolldown, and OXC.
Installation
npm install @voidzero-dev/vitepress-theme
pnpm add @voidzero-dev/vitepress-theme
If developing locally, run pnpm link between the two directories instead.
Usage
1. Import the Theme
In your .vitepress/theme/index.ts:
import type { Theme } from 'vitepress'
import Theme from '@voidzero-dev/vitepress-theme'
import "@voidzero-dev/vitepress-theme/index.css";
export default {
extends: BaseTheme as unknown as Theme,
Layout
} satisfies Theme
2. Configure Your Variant and Dev Server
In your .vitepress/config.ts:
export default {
vite: {
server: {
fs: {
allow: [resolve(__dirname, '..', '..')]
},
watch: {
ignored: ['!**/node_modules/@voidzero-dev/**']
}
},
optimizeDeps: {
exclude: ['@voidzero-dev/vitepress-theme']
}
},
themeConfig: {
variant: 'viteplus',
nav: [
{ text: 'Home', link: '/' },
]
}
}