# 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
---
## โจ 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