Skip to content

Commit 80a9ae8

Browse files
committed
docs: prepare OpenIM documentation for public release
1 parent af1e1bc commit 80a9ae8

552 files changed

Lines changed: 23976 additions & 10212 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.

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
NEXT_PUBLIC_SITE_URL=http://localhost:3000
2+
NEXT_PUBLIC_WEBSITE_URL=https://openim.io/
3+
NEXT_PUBLIC_ENTERPRISE_URL=https://openim.io/enterprise/
24
NEXT_PUBLIC_GITHUB_URL=https://github.com/openimsdk
35
# Example: https://github.com/your-org/your-docs/edit/main
46
NEXT_PUBLIC_EDIT_BASE_URL=

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
- uses: actions/setup-node@v4
1414
with:
1515
node-version: 22
16-
cache: npm
17-
- run: corepack enable && corepack prepare pnpm@10.28.0 --activate
18-
- run: npm ci --ignore-scripts --no-audit --no-fund
19-
- run: npx fumadocs-mdx
20-
- run: npm run check
21-
- run: npm run build
16+
- run: corepack enable
17+
- run: pnpm install --frozen-lockfile --ignore-scripts
18+
- run: pnpm source:generate
19+
- run: pnpm audit --prod
20+
- run: pnpm check
21+
- run: pnpm build

.github/workflows/docsets-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77
inputs:
88
docset_path:
9-
description: 'Optional docset path to check, for example content/docs/chat/sdk/v4/wasm'
9+
description: 'Optional docset path to check, for example content/docs/chat/sdk/wasm'
1010
required: false
1111
type: string
1212
dry_run:

CONTRIBUTING.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributing to OpenIM Documentation
2+
3+
Thank you for improving OpenIM documentation. Contributions must preserve the accuracy of both the product content and the documentation system.
4+
5+
## Before you start
6+
7+
- Use Node.js 22.12 or newer and the pnpm version declared in `package.json`.
8+
- Read `AGENTS.md` and `docs/CONTENT_AUTHORING.md` before editing SDK or Platform API content.
9+
- Check `git status` and preserve unrelated work already present in the worktree.
10+
- Confirm that the target capability exists in the pinned OpenIM SDK, OpenIMServer source, OpenAPI document, or immutable audit evidence.
11+
12+
## Language workflow
13+
14+
Simplified Chinese is the editorial source for client SDK guides:
15+
16+
1. Review the complete Chinese page and its evidence.
17+
2. Update the page manually; do not use scripts or machine translation for final prose.
18+
3. Update the page's audit record after the review.
19+
4. Translate the reviewed page manually into English.
20+
5. Verify that titles, parameters, examples, results, event boundaries, and links match the Chinese source and the target SDK.
21+
22+
Do not publish an English SDK page while its Chinese source is incomplete or its English audit state is deferred.
23+
24+
## Writing rules
25+
26+
- Organize task pages by user operation, not by a mechanically repeated template.
27+
- Keep parameter and result explanations next to the API operation they describe.
28+
- Do not combine parameters from unrelated APIs in one table.
29+
- Explain Future or Promise completion, event delivery, and query reconciliation as separate stages.
30+
- Give each event one owning page. Other pages link to that owner instead of registering the same listener again.
31+
- Use stable business identifiers such as `conversationID`, `groupID`, `userID`, and `clientMsgID`; never use an array index or display name as a merge key.
32+
- Do not document deprecated, reserved, unsupported, or inferred capabilities as public features.
33+
- Mark commercial capabilities through the existing Enterprise metadata and ownership system.
34+
35+
## Structural changes
36+
37+
Adding, deleting, merging, or moving a page requires coordinated updates to:
38+
39+
- English and Chinese content
40+
- route and sidebar structure
41+
- audit and API/event ownership records
42+
- search and localized generated data
43+
- approved redirects, when compatibility is required
44+
- tests covering the affected structure
45+
46+
Historical design documents under `docs/superpowers/` are archival records. Do not rewrite their old paths as if they were current implementation guidance.
47+
48+
## Validation
49+
50+
Run the checks appropriate to the change:
51+
52+
```bash
53+
pnpm content:check
54+
pnpm check
55+
```
56+
57+
Also run a production build for route, navigation, rendering, publication-state, or deployment changes:
58+
59+
```bash
60+
pnpm build
61+
```
62+
63+
After `pnpm build`, keep the repository's expected `next-env.d.ts` import if Next.js rewrites it.
64+
65+
## Pull requests
66+
67+
A documentation pull request should state:
68+
69+
- the pages or domains changed;
70+
- the SDK/server version or immutable source used for verification;
71+
- whether routes, event ownership, commercial metadata, or redirects changed;
72+
- the validation commands run and any remaining failure.
73+
74+
Do not include tokens, private deployment addresses, customer data, internal screenshots, or sensitive diagnostic logs.

0 commit comments

Comments
 (0)