Skip to content

Commit cb4f2ef

Browse files
authored
Merge pull request #31 from A3S-Lab/codex/code-site-pages
docs: launch multilingual A3S Code website
2 parents 386772a + d9d5375 commit cb4f2ef

149 files changed

Lines changed: 24857 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs-pages.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'website/**'
9+
- '.github/workflows/docs-pages.yml'
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- 'website/**'
15+
- '.github/workflows/docs-pages.yml'
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
concurrency:
22+
group: pages-${{ github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
build:
27+
name: Build documentation
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
pages: read
32+
defaults:
33+
run:
34+
working-directory: website
35+
steps:
36+
- name: Check out repository
37+
uses: actions/checkout@v4
38+
39+
- name: Set up Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 22
43+
cache: npm
44+
cache-dependency-path: website/package-lock.json
45+
46+
- name: Install dependencies
47+
run: npm ci
48+
49+
- name: Check formatting
50+
run: npm run format:check
51+
52+
- name: Lint and check language parity
53+
run: npm run lint
54+
55+
- name: Configure GitHub Pages
56+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
57+
uses: actions/configure-pages@v5
58+
59+
- name: Build website
60+
run: npm run build
61+
env:
62+
DOCS_BASE: /Code/
63+
DOCS_ORIGIN: https://a3s-lab.github.io
64+
65+
- name: Check built routes and assets
66+
run: npm run check:site
67+
68+
- name: Upload GitHub Pages artifact
69+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
70+
uses: actions/upload-pages-artifact@v4
71+
with:
72+
path: website/doc_build
73+
74+
deploy:
75+
name: Deploy documentation
76+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
77+
needs: build
78+
runs-on: ubuntu-latest
79+
permissions:
80+
pages: write
81+
id-token: write
82+
environment:
83+
name: github-pages
84+
url: ${{ steps.deployment.outputs.page_url }}
85+
steps:
86+
- name: Deploy to GitHub Pages
87+
id: deployment
88+
uses: actions/deploy-pages@v4

website/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Local
2+
.DS_Store
3+
*.local
4+
*.log*
5+
6+
# Dist
7+
node_modules
8+
dist/
9+
doc_build/
10+
11+
# IDE
12+
.vscode/*
13+
!.vscode/extensions.json
14+
.idea

website/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Lock files
2+
package-lock.json
3+
pnpm-lock.yaml
4+
yarn.lock

website/.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

website/AGENTS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Tools
2+
3+
### Prettier
4+
5+
- Run `npm run format` to format your code
6+
7+
## Docs
8+
9+
- Rslint: https://rslint.rs/llms.txt
10+
11+
### Rslint
12+
13+
- Run `npm run lint` to lint your code

website/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# A3S Code website
2+
3+
The official multilingual website and documentation for
4+
[A3S Code](https://github.com/A3S-Lab/Code), built with Rspress.
5+
6+
## Local development
7+
8+
```bash
9+
npm ci
10+
npm run dev
11+
```
12+
13+
The production site is served from `/Code/`. Override `DOCS_BASE` and
14+
`DOCS_ORIGIN` only when previewing another deployment target.
15+
16+
## Checks
17+
18+
```bash
19+
npm run format:check
20+
npm run lint
21+
npm run build
22+
```
23+
24+
The published documentation currently contains only the active `v6` line.
25+
When a new major line ships, add a version snapshot under `docs/<version>` and
26+
then list it in `multiVersion.versions` in `rspress.config.ts`.
Lines changed: 16 additions & 0 deletions
Loading

website/docs/public/favicon.svg

Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 68 additions & 0 deletions
Loading

website/docs/v6/en/_meta.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"type": "dir",
4+
"name": "guide",
5+
"label": "Documentation"
6+
},
7+
{
8+
"type": "dir",
9+
"name": "api",
10+
"label": "API"
11+
}
12+
]

0 commit comments

Comments
 (0)