Skip to content

Commit d11e32d

Browse files
committed
Initial project setup with documentation platform
Add monorepo structure for ObjectStack documentation, including Next.js site (App Router), CLI for translation and build, multi-language support, and automated workflows. Includes configuration files, CLI commands, site source, and supporting assets for English and Chinese documentation.
1 parent 72b6184 commit d11e32d

Some content is hidden

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

49 files changed

+6152
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml merge=pnpm-merge

.github/copilot-instructions.md

Whitespace-only changes.

.github/dependabot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
open-pull-requests-limit: 10
10+
labels:
11+
- "dependencies"
12+
- "automated"
13+
commit-message:
14+
prefix: "chore"
15+
prefix-development: "chore"
16+
include: "scope"
17+
18+
# Enable version updates for GitHub Actions
19+
- package-ecosystem: "github-actions"
20+
directory: "/"
21+
schedule:
22+
interval: "monthly"
23+
labels:
24+
- "dependencies"
25+
- "github-actions"
26+
commit-message:
27+
prefix: "ci"
28+
include: "scope"

.github/labeler.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
documentation:
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- 'content/**/*.mdx'
5+
- '*.md'
6+
7+
i18n:
8+
- changed-files:
9+
- any-glob-to-any-file:
10+
- 'content/**/*.cn.mdx'
11+
- 'content/**/*.en.mdx'
12+
- 'lib/i18n.ts'
13+
14+
ui:
15+
- changed-files:
16+
- any-glob-to-any-file:
17+
- 'app/**/*.tsx'
18+
- 'app/**/*.ts'
19+
- '*.tsx'
20+
21+
configuration:
22+
- changed-files:
23+
- any-glob-to-any-file:
24+
- '*.config.*'
25+
- 'tsconfig.json'
26+
- 'vercel.json'
27+
28+
dependencies:
29+
- changed-files:
30+
- any-glob-to-any-file:
31+
- 'package.json'
32+
- 'package-lock.json'
33+
- 'pnpm-lock.yaml'
34+
35+
workflows:
36+
- changed-files:
37+
- any-glob-to-any-file:
38+
- '.github/**'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^http://localhost"
5+
},
6+
{
7+
"pattern": "^https://localhost"
8+
}
9+
],
10+
"replacements": [],
11+
"httpHeaders": [],
12+
"timeout": "20s",
13+
"retryOn429": true,
14+
"retryCount": 3,
15+
"fallbackRetryDelay": "30s",
16+
"aliveStatusCodes": [200, 206, 301, 302, 307, 308]
17+
}

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Build and Test
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v3
24+
with:
25+
version: 9
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
cache: 'pnpm'
32+
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
# - name: Generate source files
37+
# run: pnpm exec fumadocs-mdx
38+
39+
#- name: Type check
40+
# run: pnpm exec tsc --noEmit
41+
42+
- name: Build
43+
run: pnpm run build
44+
env:
45+
NODE_ENV: production
46+
47+
- name: Upload build artifacts
48+
uses: actions/upload-artifact@v4
49+
if: success()
50+
with:
51+
name: build-output
52+
path: .next
53+
retention-days: 7

.github/workflows/label.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PR Labeler
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
label:
9+
name: Auto Label PR
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Label based on changed files
20+
uses: actions/labeler@v5.0.0
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
configuration-path: .github/labeler.yml

.github/workflows/link-check.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Link Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'content/**'
7+
- '**.md'
8+
- '**.mdx'
9+
schedule:
10+
# Run weekly on Monday at 00:00 UTC
11+
- cron: '0 0 * * 1'
12+
workflow_dispatch:
13+
14+
jobs:
15+
link-check:
16+
name: Check Links
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Check links in content directory
26+
uses: gaurav-nelson/github-action-markdown-link-check@1.0.17
27+
with:
28+
use-quiet-mode: 'yes'
29+
use-verbose-mode: 'no'
30+
config-file: '.github/markdown-link-check-config.json'
31+
folder-path: 'content/'
32+
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}
33+
base-branch: 'main'
34+
35+
- name: Check links in root markdown files
36+
uses: gaurav-nelson/github-action-markdown-link-check@1.0.17
37+
with:
38+
use-quiet-mode: 'yes'
39+
use-verbose-mode: 'no'
40+
config-file: '.github/markdown-link-check-config.json'
41+
file-path: './README.md'
42+
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}
43+
base-branch: 'main'

.github/workflows/preview.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Preview Deployment
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
preview-info:
9+
name: Preview Information
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Comment PR with deployment info
20+
uses: actions/github-script@v7
21+
with:
22+
script: |
23+
const prNumber = context.issue.number;
24+
25+
const comment = `## 🚀 Preview Deployment
26+
27+
This pull request will be automatically deployed to Vercel.
28+
29+
### Preview Links
30+
- 📝 **Documentation**: Will be available once Vercel deployment completes
31+
- 🌍 **Languages**: English (\`/en/docs\`) and Chinese (\`/cn/docs\`)
32+
33+
### Build Status
34+
Check the CI workflow for build status and any errors.
35+
36+
---
37+
*Automated preview information for PR #${prNumber}*`;
38+
39+
github.rest.issues.createComment({
40+
issue_number: context.issue.number,
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
body: comment
44+
});

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# dependencies
2+
/node_modules
3+
/.pnp
4+
.pnp.js
5+
6+
# testing
7+
/coverage
8+
9+
# next.js
10+
/.next/
11+
/out/
12+
13+
# production
14+
/build
15+
16+
# misc
17+
.DS_Store
18+
*.pem
19+
20+
# debug
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# local env files
26+
.env*.local
27+
28+
# vercel
29+
.vercel
30+
31+
# typescript
32+
*.tsbuildinfo
33+
next-env.d.ts
34+
35+
# fumadocs
36+
.source
37+
.next

0 commit comments

Comments
 (0)