# vitepress-theme **Repository Path**: duxphp/vitepress-theme ## Basic Information - **Project Name**: vitepress-theme - **Description**: ๐ŸŽ„ ไธ€ไธชๅŸบไบŽ vitepress 1.x ็‰ˆๆœฌ็š„ไผ˜้›…้ซ˜้ขœๅ€ผ็š„่‡ช้€‚ๅบ”ไธป้ข˜ - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-04 - **Last Updated**: 2026-02-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Dux VitePress Theme

๐ŸŽจ A modern, elegant, and customizable VitePress documentation theme

Build beautiful, multilingual, component-rich documentation sites with ease.

๐Ÿ“– Documentation ยท ๐Ÿ  GitHub ยท ๐ŸŒ Website

็ฎ€ไฝ“ไธญๆ–‡ ยท English

License VitePress Node PNPM Stars

--- ## โœจ Highlights - ๐Ÿš€ **Ready to use**: one-command install, zero-config quick start - ๐ŸŽจ **Modern design**: elegant UI with light/dark modes - ๐ŸŒ **Internationalization**: full i18n support and jump page - ๐Ÿ“š **Multiple layouts**: Home / Doc / Page / Sponsor / Changelog / Jump - ๐Ÿ” **Local search**: built-in search with graceful fallback - ๐Ÿงฉ **Rich components**: custom containers, code groups, badges, Mermaid, etc. - โšก **High performance**: powered by VitePress 1.x --- ## ๐Ÿงฑ Monorepo Structure ``` vitepress-monorepo/ โ”œโ”€ packages/ โ”‚ โ”œโ”€ theme/ # Theme source (published package) โ”‚ โ””โ”€ docs/ # Documentation site (demo & docs) โ”œโ”€ .github/workflows/deploy-docs.yml # GitHub Pages deployment โ””โ”€ README.md / README.en.md ``` > Docs deploy to `https://duxweb.github.io/vitepress-theme/` by default. --- ## ๐Ÿš€ Get Started (Use in your project) ### 1. Install ```bash pnpm add @duxweb/vitepress-theme # or npm i @duxweb/vitepress-theme ``` ### 2. Enable the theme ```ts // .vitepress/theme/index.ts import theme from '@duxweb/vitepress-theme' import '@duxweb/vitepress-theme/dist/index.css' export default { extends: theme } ``` ### 3. Minimal config (recommended) Automatically injects `vite.ssr.noExternal`, `optimizeDeps.exclude`, and enables Mermaid runtime rendering (powered by `vitepress-mermaid-renderer`, GPL-3.0-only). ```ts // .vitepress/config.mts import { withDuxTheme } from '@duxweb/vitepress-theme/config' export default withDuxTheme({ // your config... }) ``` ### 4. Homepage example ```md --- layout: home hero: name: My Project text: Modern VitePress Theme actions: - theme: brand text: Get Started link: /guide/ features: - icon: โšก title: Fast details: Built on VitePress --- ``` --- ## ๐Ÿงญ Working with Docs (this repo) ```bash # Develop docs site pnpm dev # Build all packages (theme and docs) pnpm build # Build docs only pnpm build:docs # Preview docs pnpm preview ``` > The docs build auto-sets `base` by environment: > - Local: `/` > - GitHub Pages: `/vitepress-theme/` --- ## ๐Ÿงฉ Layouts & Features | Layout | Use Case | Notes | |---|---|---| | `home` | Homepage | Hero / Features / QuickStart | | `doc` | Docs | Sidebar / TOC / Doc footer | | `page` | Single page | Centered content + PageHero | | `sponsor` | Sponsor | Payment methods / supporters / stats | | `changelog` | Releases | Version history / categories | | `jump` | Language jump | Detect & redirect to preferred language | See the online docs for more examples and API. --- ## ๐ŸŒ Deploy to GitHub Pages This repo ships with `.github/workflows/deploy-docs.yml`. - Triggers: push to `main` or manual run - Artifact: `packages/docs/.vitepress/dist` - URL: `https://duxweb.github.io/vitepress-theme/` If deploying in your own repo, make sure: - VitePress `base` matches your repo name (e.g., `/vitepress-theme/`) - Actions has Pages permissions and uploads the dist --- ## ๐Ÿค Contributing Issues and PRs are welcome: 1. Fork the repo 2. Create a branch: `feat/your-feature` 3. Commit and open a PR --- ## ๐Ÿ“„ License [MIT](./LICENSE) ---

Made with โค๏ธ by DuxWeb