Skip to content

Commit 219afbc

Browse files
committed
docs: tighten docs i18n source workflow
1 parent 4954d02 commit 219afbc

8 files changed

Lines changed: 638 additions & 18 deletions

File tree

docs/docs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@
124124
"source": "/context",
125125
"destination": "/concepts/context"
126126
},
127+
{
128+
"source": "/zh-CN",
129+
"destination": "/zh-CN/index"
130+
},
131+
{
132+
"source": "/zh-CN/",
133+
"destination": "/zh-CN/index"
134+
},
127135
{
128136
"source": "/compaction",
129137
"destination": "/concepts/compaction"

docs/plugins/community.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ channels, tools, providers, or other capabilities. They are built and maintained
1313
by the community, published on [ClawHub](/tools/clawhub) or npm, and
1414
installable with a single command.
1515

16+
ClawHub is the canonical discovery surface for community plugins. Do not open
17+
docs-only PRs just to add your plugin here for discoverability; publish it on
18+
ClawHub instead.
19+
1620
```bash
1721
openclaw plugins install <package-name>
1822
```
@@ -116,14 +120,13 @@ We welcome community plugins that are useful, documented, and safe to operate.
116120

117121
</Step>
118122

119-
<Step title="Open a PR">
120-
Add your plugin to this page with:
123+
<Step title="Use docs PRs only for source-doc changes">
124+
You do not need a docs PR just to make your plugin discoverable. Publish it
125+
on ClawHub instead.
121126

122-
- Plugin name
123-
- npm package name
124-
- GitHub repository URL
125-
- One-line description
126-
- Install command
127+
Open a docs PR only when OpenClaw's source docs need an actual content
128+
change, such as correcting install guidance or adding cross-repo
129+
documentation that belongs in the main docs set.
127130

128131
</Step>
129132
</Steps>

docs/start/getting-started.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,38 @@ Need to install Node? See [Node setup](/install/node).
8888
</Step>
8989
</Steps>
9090

91+
<Accordion title="Advanced: mount a custom Control UI build">
92+
If you maintain a localized or customized dashboard build, point
93+
`gateway.controlUi.root` to a directory that contains your built static
94+
assets and `index.html`.
95+
96+
```bash
97+
mkdir -p "$HOME/.openclaw/control-ui-custom"
98+
# Copy your built static files into that directory.
99+
```
100+
101+
Then set:
102+
103+
```json
104+
{
105+
"gateway": {
106+
"controlUi": {
107+
"enabled": true,
108+
"root": "$HOME/.openclaw/control-ui-custom"
109+
}
110+
}
111+
}
112+
```
113+
114+
Restart the gateway and reopen the dashboard:
115+
116+
```bash
117+
openclaw gateway restart
118+
openclaw dashboard
119+
```
120+
121+
</Accordion>
122+
91123
## What to do next
92124

93125
<Columns>

scripts/docs-i18n/doc_mode.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const (
1717
bodyTagEnd = "</body>"
1818
)
1919

20-
func processFileDoc(ctx context.Context, translator *PiTranslator, docsRoot, filePath, srcLang, tgtLang string, overwrite bool) (bool, error) {
20+
func processFileDoc(ctx context.Context, translator *PiTranslator, docsRoot, filePath, srcLang, tgtLang string, overwrite bool, routes *routeIndex) (bool, error) {
2121
absPath, relPath, err := resolveDocsPath(docsRoot, filePath)
2222
if err != nil {
2323
return false, err
@@ -65,6 +65,7 @@ func processFileDoc(ctx context.Context, translator *PiTranslator, docsRoot, fil
6565
if err := applyFrontmatterTranslations(frontData, markers, translatedFront); err != nil {
6666
return false, fmt.Errorf("frontmatter translation failed for %s: %w", relPath, err)
6767
}
68+
translatedBody = routes.localizeBodyLinks(translatedBody)
6869

6970
updatedFront, err := encodeFrontMatter(frontData, relPath, content)
7071
if err != nil {

0 commit comments

Comments
 (0)