Skip to content

Commit ade7049

Browse files
CC11001100claude
andcommitted
feat: add official website with React + TypeScript + Ant Design
- Create website/ directory with Vite + React 19 + TypeScript + Ant Design 6 - Implement landing page with Hero, Features, Architecture, Access Methods, Quick Start sections - Configure GitHub Pages deployment via GitHub Actions (deploy-website.yml) - Add npm ecosystem to Dependabot config for website dependencies - Update .gitignore to exclude website/node_modules and website/dist - Base path configured for /versions-skills/ GitHub Pages deployment Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent aa383ff commit ade7049

26 files changed

Lines changed: 3632 additions & 0 deletions

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ updates:
55
schedule:
66
interval: weekly
77
open-pull-requests-limit: 5
8+
- package-ecosystem: npm
9+
directory: /website
10+
schedule:
11+
interval: weekly
12+
open-pull-requests-limit: 5
813
- package-ecosystem: github-actions
914
directory: /
1015
schedule:
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy Website to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'website/**'
8+
- '.github/workflows/deploy-website.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
env:
21+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
22+
23+
jobs:
24+
build:
25+
name: Build Website
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v7
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: '22'
35+
cache: 'npm'
36+
cache-dependency-path: 'website/package-lock.json'
37+
38+
- name: Install dependencies
39+
working-directory: website
40+
run: npm ci
41+
42+
- name: Build website
43+
working-directory: website
44+
run: npm run build
45+
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v4
48+
with:
49+
path: website/dist
50+
51+
deploy:
52+
name: Deploy to GitHub Pages
53+
needs: build
54+
runs-on: ubuntu-latest
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ go.work.sum
2727
# Legacy local dirs
2828
test
2929
test2
30+
31+
# Website
32+
website/node_modules/
33+
website/dist/

website/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

website/.oxlintrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["react", "typescript", "oxc"],
4+
"rules": {
5+
"react/rules-of-hooks": "error",
6+
"react/only-export-components": ["warn", { "allowConstantExport": true }]
7+
}
8+
}

website/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
9+
10+
## React Compiler
11+
12+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13+
14+
## Expanding the Oxlint configuration
15+
16+
If you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:
17+
18+
```json
19+
{
20+
"$schema": "./node_modules/oxlint/configuration_schema.json",
21+
"plugins": ["react", "typescript", "oxc"],
22+
"options": {
23+
"typeAware": true
24+
},
25+
"rules": {
26+
"react/rules-of-hooks": "error",
27+
"react/only-export-components": ["warn", { "allowConstantExport": true }]
28+
}
29+
}
30+
```
31+
32+
See the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.

website/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="zh-CN">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/versions-skills/favicon.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta name="description" content="Versions-Skills — 强大的 Go 语言版本号解析、比较、排序、分组和约束检查库,支持 Skills、Go SDK、CLI 和 MCP Server 四种接入方式" />
8+
<meta name="keywords" content="versions,semver,go,version-parsing,version-sorting,mcp,cli,claude-code,ai-agent" />
9+
<title>Versions-Skills — Go 版本号操作全栈工具</title>
10+
</head>
11+
<body>
12+
<div id="root"></div>
13+
<script type="module" src="/src/main.tsx"></script>
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)