Skip to content

Commit c29ead6

Browse files
author
shijiashuai
committed
feat: add professional VitePress GitHub Pages site
sites: 添加专业级 VitePress GitHub Pages 站点 Features: - Modern VitePress documentation site with bilingual support (zh/en) - Custom theme with beautiful gradient design and animations - Local search functionality - Responsive design for mobile, tablet, desktop - Multi-language navigation and sidebars - Automatic deployment via GitHub Actions - Modern UI with stats cards, category cards, and rich interactions - Custom CSS with dark/light mode support Added: - .vitepress/ - VitePress configuration, theme, and styles - zh/ - Chinese documentation pages - en/ - English documentation pages - .github/workflows/deploy.yml - Auto-deployment workflow - package.json - Node.js dependencies - Logo and assets This provides a world-class documentation experience for the project.
1 parent ca25844 commit c29ead6

25 files changed

+1776
-33
lines changed

.github/workflows/deploy.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
cache: npm
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
35+
- name: Install dependencies
36+
run: |
37+
npm init -y
38+
npm install -D vitepress@latest postcss@latest autoprefixer@latest
39+
40+
- name: Build with VitePress
41+
run: |
42+
npx vitepress build
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: .vitepress/dist
48+
49+
deploy:
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
needs: build
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,27 @@
1-
# OS generated files
2-
.DS_Store
3-
.DS_Store?
4-
._*
5-
.Spotlight-V100
6-
.Trashes
7-
ehthumbs.db
8-
Thumbs.db
1+
# Dependencies
2+
node_modules/
3+
.pnpm-store/
94

10-
# IDE files
5+
# Build output
6+
dist/
7+
.vitepress/dist/
8+
.vitepress/cache/
9+
.vitepress/.temp/
10+
11+
# IDE
1112
.vscode/
1213
.idea/
1314
*.swp
1415
*.swo
1516

17+
# OS
18+
.DS_Store
19+
Thumbs.db
20+
1621
# Logs
1722
*.log
1823
npm-debug.log*
19-
yarn-debug.log*
20-
yarn-error.log*
21-
22-
# Dependencies
23-
node_modules/
24-
25-
# Environment files
26-
.env
27-
.env.local
28-
.env.*.local
2924

30-
# Python
31-
__pycache__/
32-
*.py[cod]
33-
*.pyo
34-
.venv/
35-
venv/
36-
37-
# Temporary files
38-
*.tmp
39-
*.temp
40-
41-
# Build output
42-
dist/
43-
build/
25+
# Runtime
26+
.cache/
27+
temp/

0 commit comments

Comments
 (0)