Skip to content

Commit 983cd54

Browse files
authored
fix(docs): redirect docs root to localized entrypoints (#246)
* fix(docs): redirect docs root to localized entrypoints * fix(docs): serve english docs from root
1 parent f2daf68 commit 983cd54

4 files changed

Lines changed: 22 additions & 48 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ const enSidebar = [
44
{
55
text: "Get Started",
66
items: [
7-
{ text: "Introduction", link: "/en/" },
8-
{ text: "Contributing", link: "/en/guide/contributing" },
9-
{ text: "Channel Configuration", link: "/en/guide/channels" },
10-
{ text: "Model Configuration", link: "/en/guide/models" },
11-
{ text: "Skill Installation", link: "/en/guide/skills" },
7+
{ text: "Introduction", link: "/" },
8+
{ text: "Contributing", link: "/guide/contributing" },
9+
{ text: "Channel Configuration", link: "/guide/channels" },
10+
{ text: "Model Configuration", link: "/guide/models" },
11+
{ text: "Skill Installation", link: "/guide/skills" },
1212
],
1313
},
1414
{
1515
text: "Channel Guides",
1616
items: [
17-
{ text: "Feishu", link: "/en/guide/channels/feishu" },
18-
{ text: "Slack", link: "/en/guide/channels/slack" },
19-
{ text: "Discord", link: "/en/guide/channels/discord" },
17+
{ text: "Feishu", link: "/guide/channels/feishu" },
18+
{ text: "Slack", link: "/guide/channels/slack" },
19+
{ text: "Discord", link: "/guide/channels/discord" },
2020
],
2121
},
2222
];
@@ -47,13 +47,17 @@ export default defineConfig({
4747
description: "Nexu documentation for channels, models, and skills.",
4848
cleanUrls: true,
4949
lastUpdated: true,
50+
rewrites: {
51+
"en/index.md": "index.md",
52+
"en/:path*": ":path*",
53+
},
5054
locales: {
51-
en: {
55+
root: {
5256
label: "English",
5357
lang: "en-US",
5458
title: "Nexu Docs",
5559
description: "Nexu documentation for channels, models, and skills.",
56-
link: "/en/",
60+
link: "/",
5761
},
5862
zh: {
5963
label: "简体中文",
@@ -146,18 +150,8 @@ export default defineConfig({
146150
next: "Next page",
147151
},
148152
sidebar: {
149-
"/en/": enSidebar,
153+
"/": enSidebar,
150154
"/zh/": zhSidebar,
151-
"/": [
152-
{
153-
text: "Docs",
154-
items: [
155-
{ text: "Introduction", link: "/" },
156-
{ text: "English", link: "/en/" },
157-
{ text: "简体中文", link: "/zh/" },
158-
],
159-
},
160-
],
161155
},
162156
},
163157
});

docs/en/guide/channels.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Nexu supports multiple chat channels at the same time. For this documentation set, the core channel guides are:
44

5-
- [Feishu](/en/guide/channels/feishu)
6-
- [Slack](/en/guide/channels/slack)
7-
- [Discord](/en/guide/channels/discord)
5+
- [Feishu](/guide/channels/feishu)
6+
- [Slack](/guide/channels/slack)
7+
- [Discord](/guide/channels/discord)
88

99
## Recommended setup order
1010

docs/en/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Welcome to the Nexu docs.
1010

1111
## How to use this site
1212

13-
- Open [Contributing](/en/guide/contributing) if you want to edit docs or submit updates
14-
- Start with [Channel Configuration](/en/guide/channels) if you are connecting chat platforms first
15-
- Go to [Model Configuration](/en/guide/models) if you are setting up providers and API keys
16-
- Open [Skill Installation](/en/guide/skills) if you are managing runtime capabilities
13+
- Open [Contributing](/guide/contributing) if you want to edit docs or submit updates
14+
- Start with [Channel Configuration](/guide/channels) if you are connecting chat platforms first
15+
- Go to [Model Configuration](/guide/models) if you are setting up providers and API keys
16+
- Open [Skill Installation](/guide/skills) if you are managing runtime capabilities
1717

1818
Use the sidebar to move through the docs directly.

docs/index.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)