react-docs-ui 0.1.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-docs-ui.css +1 -1
- package/dist/react-docs-ui.es.js +8270 -7766
- package/package.json +16 -16
- package/dist/config/ai.json +0 -60
- package/dist/config/site.en.yaml +0 -158
- package/dist/config/site.yaml +0 -166
- package/dist/docs/en/guide/configuration.md +0 -149
- package/dist/docs/en/guide/installation.md +0 -63
- package/dist/docs/en/guide/introduction.md +0 -28
- package/dist/docs/en/guide/quick-start.md +0 -108
- package/dist/docs/en/guide.md +0 -10
- package/dist/docs/en/index.md +0 -34
- package/dist/docs/zh-cn/guide/configuration.md +0 -207
- package/dist/docs/zh-cn/guide/installation.md +0 -63
- package/dist/docs/zh-cn/guide/introduction.md +0 -28
- package/dist/docs/zh-cn/guide/quick-start.md +0 -108
- package/dist/docs/zh-cn/guide.md +0 -10
- package/dist/docs/zh-cn/index.md +0 -34
- package/dist/images/favicon-dark.svg +0 -7
- package/dist/images/favicon.svg +0 -7
- package/dist/images/placeholder.md +0 -25
- package/dist/react-docs-ui.es.js.map +0 -1
- package/dist/react-docs-ui.umd.js +0 -252
- package/dist/react-docs-ui.umd.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-docs-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React documentation site UI components — navigation, sidebar, search, code highlight, MDX rendering and theming to help you build docs fast.",
|
|
6
6
|
"homepage": "https://shenjianZ.github.io/react-docs-ui",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"documentation-site",
|
|
17
17
|
"typescript"
|
|
18
18
|
],
|
|
19
|
-
"main": "dist/react-docs-ui.umd.js",
|
|
20
19
|
"module": "dist/react-docs-ui.es.js",
|
|
21
20
|
"types": "dist/types/index.d.ts",
|
|
22
21
|
"files": [
|
|
@@ -26,8 +25,8 @@
|
|
|
26
25
|
],
|
|
27
26
|
"exports": {
|
|
28
27
|
".": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"types": "./dist/types/index.d.ts",
|
|
29
|
+
"import": "./dist/react-docs-ui.es.js"
|
|
31
30
|
},
|
|
32
31
|
"./dist/react-docs-ui.css": "./dist/react-docs-ui.css"
|
|
33
32
|
},
|
|
@@ -47,32 +46,29 @@
|
|
|
47
46
|
"@radix-ui/react-scroll-area": "^1.2.9",
|
|
48
47
|
"@radix-ui/react-slot": "^1.2.3",
|
|
49
48
|
"@radix-ui/react-tooltip": "^1.2.7",
|
|
50
|
-
"@tailwindcss/vite": "^4.1.11",
|
|
51
|
-
"buffer": "^6.0.3",
|
|
52
49
|
"class-variance-authority": "^0.7.1",
|
|
53
50
|
"clsx": "^2.1.1",
|
|
54
51
|
"cmdk": "^1.1.1",
|
|
55
|
-
"glob": "^11.0.3",
|
|
56
52
|
"gray-matter": "^4.0.3",
|
|
57
53
|
"js-yaml": "^4.1.0",
|
|
58
|
-
"lowlight": "^3.3.0",
|
|
59
54
|
"lucide-react": "^0.539.0",
|
|
60
55
|
"next-themes": "^0.4.6",
|
|
61
|
-
"react": ">=18",
|
|
62
|
-
"react-dom": ">=18",
|
|
63
56
|
"react-markdown": "^10.1.0",
|
|
64
|
-
"react-router-dom": "^7.8.0",
|
|
65
57
|
"rehype-autolink-headings": "^7.1.0",
|
|
66
58
|
"rehype-highlight": "^7.0.2",
|
|
67
|
-
"rehype-pretty-code": "^0.14.1",
|
|
68
59
|
"rehype-raw": "^7.0.0",
|
|
69
60
|
"rehype-slug": "^6.0.0",
|
|
70
61
|
"remark-gfm": "^4.0.1",
|
|
71
|
-
"
|
|
72
|
-
"tailwind-merge": "^3.3.1",
|
|
73
|
-
"tailwindcss": "^4.1.11"
|
|
62
|
+
"tailwind-merge": "^3.3.1"
|
|
74
63
|
},
|
|
75
64
|
"devDependencies": {
|
|
65
|
+
"react": "^19.0.0",
|
|
66
|
+
"react-dom": "^19.0.0",
|
|
67
|
+
"buffer": "^6.0.3",
|
|
68
|
+
"glob": "^11.0.3",
|
|
69
|
+
"@tailwindcss/vite": "^4.1.11",
|
|
70
|
+
"react-router-dom": "^7.8.0",
|
|
71
|
+
"tailwindcss": "^4.1.11",
|
|
76
72
|
"@eslint/js": "^9.32.0",
|
|
77
73
|
"@types/node": "^24.2.1",
|
|
78
74
|
"@types/react": "^19.1.9",
|
|
@@ -91,6 +87,10 @@
|
|
|
91
87
|
},
|
|
92
88
|
"peerDependencies": {
|
|
93
89
|
"react": ">=18",
|
|
94
|
-
"react-dom": ">=18"
|
|
90
|
+
"react-dom": ">=18",
|
|
91
|
+
"react-router-dom": "^7"
|
|
92
|
+
},
|
|
93
|
+
"engines": {
|
|
94
|
+
"node": ">=18"
|
|
95
95
|
}
|
|
96
96
|
}
|
package/dist/config/ai.json
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"enabled": true,
|
|
3
|
-
"provider": "openai",
|
|
4
|
-
"systemPrompt": "你是一个专业的文档助手,请根据用户的问题,提供准确的答案。",
|
|
5
|
-
"models": {
|
|
6
|
-
"openai": {
|
|
7
|
-
"modelId": "gpt-3.5-turbo",
|
|
8
|
-
"apiKey": "",
|
|
9
|
-
"baseUrl": "https://api.openai.com/v1",
|
|
10
|
-
"maxTokens": 4000,
|
|
11
|
-
"temperature": 0.7
|
|
12
|
-
},
|
|
13
|
-
"claude": {
|
|
14
|
-
"modelId": "claude-3-sonnet-20240229",
|
|
15
|
-
"apiKey": "",
|
|
16
|
-
"baseUrl": "https://api.anthropic.com",
|
|
17
|
-
"maxTokens": 4000,
|
|
18
|
-
"temperature": 0.7
|
|
19
|
-
},
|
|
20
|
-
"gemini": {
|
|
21
|
-
"modelId": "gemini-pro",
|
|
22
|
-
"apiKey": "",
|
|
23
|
-
"baseUrl": "https://generativelanguage.googleapis.com/v1",
|
|
24
|
-
"maxTokens": 4000,
|
|
25
|
-
"temperature": 0.7
|
|
26
|
-
},
|
|
27
|
-
"deepseek-v3": {
|
|
28
|
-
"modelId": "deepseek-chat",
|
|
29
|
-
"apiKey": "",
|
|
30
|
-
"baseUrl": "https://api.deepseek.com",
|
|
31
|
-
"maxTokens": 4000,
|
|
32
|
-
"temperature": 0.7
|
|
33
|
-
},
|
|
34
|
-
"deepseek-reasoner": {
|
|
35
|
-
"modelId": "deepseek-reasoner",
|
|
36
|
-
"apiKey": "",
|
|
37
|
-
"baseUrl": "https://api.deepseek.com",
|
|
38
|
-
"maxTokens": 4000,
|
|
39
|
-
"temperature": 0.7
|
|
40
|
-
},
|
|
41
|
-
"custom": {
|
|
42
|
-
"modelId": "",
|
|
43
|
-
"apiKey": "",
|
|
44
|
-
"baseUrl": "",
|
|
45
|
-
"maxTokens": 4000,
|
|
46
|
-
"temperature": 0.7
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"features": {
|
|
50
|
-
"chatAssistant": true,
|
|
51
|
-
"documentSummary": true,
|
|
52
|
-
"codeExplanation": true,
|
|
53
|
-
"searchEnhancement": false
|
|
54
|
-
},
|
|
55
|
-
"ui": {
|
|
56
|
-
"position": "bottom-right",
|
|
57
|
-
"theme": "auto",
|
|
58
|
-
"size": "medium"
|
|
59
|
-
}
|
|
60
|
-
}
|
package/dist/config/site.en.yaml
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
# Website Configuration
|
|
2
|
-
site:
|
|
3
|
-
title: "React Docs UI Example"
|
|
4
|
-
description: "Example documentation website built with React Docs UI"
|
|
5
|
-
# Logo formats supported:
|
|
6
|
-
# 1. emoji: "🤖"
|
|
7
|
-
# 2. image URL: "https://example.com/logo.png"
|
|
8
|
-
# 3. local image: "/images/logo.png"
|
|
9
|
-
# 4. relative path: "./assets/logo.svg"
|
|
10
|
-
logo:
|
|
11
|
-
light: "/images/favicon.svg"
|
|
12
|
-
dark: "/images/favicon-dark.svg"
|
|
13
|
-
author: "React Docs UI Team"
|
|
14
|
-
|
|
15
|
-
# Navigation Bar Configuration
|
|
16
|
-
navbar:
|
|
17
|
-
showLogo: true
|
|
18
|
-
showTitle: true
|
|
19
|
-
showLanguageSwitcher: true
|
|
20
|
-
items:
|
|
21
|
-
- title: "Home"
|
|
22
|
-
link: "/"
|
|
23
|
-
active: true
|
|
24
|
-
- title: "Guide"
|
|
25
|
-
link: "/guide"
|
|
26
|
-
actions:
|
|
27
|
-
- type: "github"
|
|
28
|
-
link: "https://github.com/shenjianZ/React-docs-ui"
|
|
29
|
-
enabled: true
|
|
30
|
-
|
|
31
|
-
# Sidebar Navigation Configuration
|
|
32
|
-
sidebar:
|
|
33
|
-
enabled: true
|
|
34
|
-
collections:
|
|
35
|
-
guide:
|
|
36
|
-
sections:
|
|
37
|
-
- title: "Getting Started"
|
|
38
|
-
path: "/guide"
|
|
39
|
-
children:
|
|
40
|
-
- title: "Introduction"
|
|
41
|
-
path: "/guide/introduction"
|
|
42
|
-
- title: "Installation"
|
|
43
|
-
path: "/guide/installation"
|
|
44
|
-
- title: "Quick Start"
|
|
45
|
-
path: "/guide/quick-start"
|
|
46
|
-
- title: "Configuration"
|
|
47
|
-
path: "/guide/configuration"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# Theme Configuration
|
|
51
|
-
theme:
|
|
52
|
-
# Default theme mode: 'light' | 'dark' | 'auto'
|
|
53
|
-
# light: Force light mode
|
|
54
|
-
# dark: Force dark mode
|
|
55
|
-
# auto: Follow system preference (default)
|
|
56
|
-
defaultMode: "auto"
|
|
57
|
-
|
|
58
|
-
# Allow users to toggle theme (show theme toggle button)
|
|
59
|
-
allowToggle: true
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
# Table of Contents Configuration
|
|
63
|
-
toc:
|
|
64
|
-
# Maximum heading level to display in TOC (1-6)
|
|
65
|
-
maxLevel: 3
|
|
66
|
-
|
|
67
|
-
# Enable table of contents
|
|
68
|
-
enabled: true
|
|
69
|
-
|
|
70
|
-
# TOC title
|
|
71
|
-
title: "On This Page"
|
|
72
|
-
|
|
73
|
-
# Footer Configuration
|
|
74
|
-
footer:
|
|
75
|
-
enabled: true
|
|
76
|
-
copyright: "© 2024 React Docs UI. All rights reserved."
|
|
77
|
-
repository:
|
|
78
|
-
url: "https://github.com/shenjianZ/React-docs-ui"
|
|
79
|
-
branch: "master"
|
|
80
|
-
lastUpdated: "2025-08-14"
|
|
81
|
-
version: "v0.1.7"
|
|
82
|
-
groups:
|
|
83
|
-
- title: "Community"
|
|
84
|
-
items:
|
|
85
|
-
- title: "Discussions"
|
|
86
|
-
link: "https://github.com/shenjianZ/React-docs-ui/discussions"
|
|
87
|
-
external: true
|
|
88
|
-
- title: "Issues"
|
|
89
|
-
link: "https://github.com/shenjianZ/React-docs-ui/issues"
|
|
90
|
-
external: true
|
|
91
|
-
- title: "Contributing"
|
|
92
|
-
link: "https://github.com/shenjianZ/React-docs-ui/blob/master/CONTRIBUTING.md"
|
|
93
|
-
external: true
|
|
94
|
-
- title: "Releases"
|
|
95
|
-
link: "https://github.com/shenjianZ/React-docs-ui/releases"
|
|
96
|
-
external: true
|
|
97
|
-
- title: "Help & Support"
|
|
98
|
-
items:
|
|
99
|
-
- title: "Examples"
|
|
100
|
-
link: "/guide/quick-start"
|
|
101
|
-
- title: "Source Code"
|
|
102
|
-
link: "https://github.com/shenjianZ/React-docs-ui"
|
|
103
|
-
external: true
|
|
104
|
-
- title: "License"
|
|
105
|
-
link: "https://github.com/shenjianZ/React-docs-ui/blob/master/LICENSE"
|
|
106
|
-
external: true
|
|
107
|
-
- title: "Back to Top"
|
|
108
|
-
link: "#"
|
|
109
|
-
action: "scrollTop"
|
|
110
|
-
social:
|
|
111
|
-
- name: "email"
|
|
112
|
-
url: "mailto:contact@example.com"
|
|
113
|
-
icon: "mail"
|
|
114
|
-
- name: "github"
|
|
115
|
-
link: "https://github.com/shenjianZ/React-docs-ui"
|
|
116
|
-
icon: "github"
|
|
117
|
-
# - name: "youtube"
|
|
118
|
-
# url: "https://youtube.com/@yourhandle"
|
|
119
|
-
# icon: "youtube"
|
|
120
|
-
# - name: "twitter"
|
|
121
|
-
# url: "https://twitter.com/yourhandle"
|
|
122
|
-
# icon: "twitter"
|
|
123
|
-
# - name: "discord"
|
|
124
|
-
# url: "https://discord.gg/yourinvite"
|
|
125
|
-
# icon: "discord"
|
|
126
|
-
# - name: "telegram"
|
|
127
|
-
# url: "https://t.me/yourhandle"
|
|
128
|
-
# icon: "telegram"
|
|
129
|
-
# - name: "tiktok"
|
|
130
|
-
# url: "https://tiktok.com/@yourhandle"
|
|
131
|
-
# icon: "tiktok"
|
|
132
|
-
- name: "bilibili"
|
|
133
|
-
url: "https://space.bilibili.com/your_bilibili_id"
|
|
134
|
-
icon: "bilibili"
|
|
135
|
-
- name: "qq"
|
|
136
|
-
url: "mqqapi://card/show_pslcard?src_type=internal&version=1&uin=your_qq_id&card_type=person&source=qrcode"
|
|
137
|
-
icon: "qq"
|
|
138
|
-
- name: "wechat"
|
|
139
|
-
url: "weixin://dl/add?your_wechat_id"
|
|
140
|
-
icon: "wechat"
|
|
141
|
-
# - name: "weibo"
|
|
142
|
-
# url: "https://weibo.com/yourhandle"
|
|
143
|
-
# icon: "weibo"
|
|
144
|
-
# - name: "douyin"
|
|
145
|
-
# url: "https://www.douyin.com/user/yourhandle"
|
|
146
|
-
# icon: "douyin"
|
|
147
|
-
# - name: "zhihu"
|
|
148
|
-
# url: "https://www.zhihu.com/people/yourhandle"
|
|
149
|
-
# icon: "zhihu"
|
|
150
|
-
|
|
151
|
-
# PWA Configuration
|
|
152
|
-
pwa:
|
|
153
|
-
enabled: false
|
|
154
|
-
name: "React Docs UI"
|
|
155
|
-
shortName: "ReactDocsUI"
|
|
156
|
-
description: "Beautiful documentation websites made simple"
|
|
157
|
-
themeColor: "#ffffff"
|
|
158
|
-
backgroundColor: "#ffffff"
|
package/dist/config/site.yaml
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# 网站基本配置
|
|
2
|
-
site:
|
|
3
|
-
title: "React Docs UI 示例项目"
|
|
4
|
-
description: "基于 React Docs UI 构建的文档网站示例"
|
|
5
|
-
# logo支持以下格式:
|
|
6
|
-
# 1. emoji: "🤖"
|
|
7
|
-
# 2. 图片URL: "https://example.com/logo.png"
|
|
8
|
-
# 3. 本地图片: "/images/logo.png"
|
|
9
|
-
# 4. 相对路径: "./assets/logo.svg"
|
|
10
|
-
logo:
|
|
11
|
-
light: "/images/favicon.svg"
|
|
12
|
-
dark: "/images/favicon-dark.svg"
|
|
13
|
-
author: "React Docs UI Team"
|
|
14
|
-
|
|
15
|
-
# 顶部导航配置
|
|
16
|
-
navbar:
|
|
17
|
-
showLogo: true
|
|
18
|
-
showTitle: true
|
|
19
|
-
showLanguageSwitcher: true
|
|
20
|
-
items:
|
|
21
|
-
- title: "首页"
|
|
22
|
-
link: "/"
|
|
23
|
-
active: true
|
|
24
|
-
- title: "指南"
|
|
25
|
-
link: "/guide"
|
|
26
|
-
actions:
|
|
27
|
-
- type: "github"
|
|
28
|
-
link: "https://github.com/shenjianZ/React-docs-ui"
|
|
29
|
-
enabled: true
|
|
30
|
-
|
|
31
|
-
# 侧边栏导航配置
|
|
32
|
-
sidebar:
|
|
33
|
-
enabled: true
|
|
34
|
-
collections:
|
|
35
|
-
guide:
|
|
36
|
-
sections:
|
|
37
|
-
- title: "快速开始"
|
|
38
|
-
path: "/guide"
|
|
39
|
-
children:
|
|
40
|
-
- title: "介绍"
|
|
41
|
-
path: "/guide/introduction"
|
|
42
|
-
- title: "安装"
|
|
43
|
-
path: "/guide/installation"
|
|
44
|
-
- title: "快速上手"
|
|
45
|
-
path: "/guide/quick-start"
|
|
46
|
-
- title: "配置说明"
|
|
47
|
-
path: "/guide/configuration"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# Theme Configuration
|
|
51
|
-
theme:
|
|
52
|
-
# Default theme mode: 'light' | 'dark' | 'auto'
|
|
53
|
-
# light: Force light mode
|
|
54
|
-
# dark: Force dark mode
|
|
55
|
-
# auto: Follow system preference (default)
|
|
56
|
-
defaultMode: "auto"
|
|
57
|
-
|
|
58
|
-
# Allow users to toggle theme (show theme toggle button)
|
|
59
|
-
allowToggle: true
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
# Table of Contents Configuration
|
|
63
|
-
toc:
|
|
64
|
-
# Maximum heading level to display in TOC (1-6)
|
|
65
|
-
maxLevel: 3
|
|
66
|
-
|
|
67
|
-
# Enable table of contents
|
|
68
|
-
enabled: true
|
|
69
|
-
|
|
70
|
-
# TOC title
|
|
71
|
-
title: "本页目录"
|
|
72
|
-
|
|
73
|
-
# Footer Configuration
|
|
74
|
-
footer:
|
|
75
|
-
enabled: true
|
|
76
|
-
copyright: "© 2025 React Docs UI. All rights reserved."
|
|
77
|
-
repository:
|
|
78
|
-
url: "https://github.com/shenjianZ/React-docs-ui"
|
|
79
|
-
branch: "master"
|
|
80
|
-
lastUpdated: "2025-08-14"
|
|
81
|
-
version: "v0.1.7"
|
|
82
|
-
groups:
|
|
83
|
-
- title: "社区"
|
|
84
|
-
items:
|
|
85
|
-
- title: "讨论区"
|
|
86
|
-
link: "https://github.com/shenjianZ/React-docs-ui/discussions"
|
|
87
|
-
external: true
|
|
88
|
-
- title: "问题反馈"
|
|
89
|
-
link: "https://github.com/shenjianZ/React-docs-ui/issues"
|
|
90
|
-
external: true
|
|
91
|
-
- title: "贡献指南"
|
|
92
|
-
link: "https://github.com/shenjianZ/React-docs-ui/blob/master/CONTRIBUTING.md"
|
|
93
|
-
external: true
|
|
94
|
-
- title: "版本发布"
|
|
95
|
-
link: "https://github.com/shenjianZ/React-docs-ui/releases"
|
|
96
|
-
external: true
|
|
97
|
-
- title: "帮助支持"
|
|
98
|
-
items:
|
|
99
|
-
- title: "示例"
|
|
100
|
-
link: "/guide/quick-start"
|
|
101
|
-
- title: "源代码"
|
|
102
|
-
link: "https://github.com/shenjianZ/React-docs-ui"
|
|
103
|
-
external: true
|
|
104
|
-
- title: "开源许可"
|
|
105
|
-
link: "https://github.com/shenjianZ/React-docs-ui/blob/master/LICENSE"
|
|
106
|
-
external: true
|
|
107
|
-
- title: "回到顶部"
|
|
108
|
-
link: "#"
|
|
109
|
-
action: "scrollTop"
|
|
110
|
-
links:
|
|
111
|
-
- title: "Documentation"
|
|
112
|
-
link: "/guide/introduction"
|
|
113
|
-
- title: "GitHub"
|
|
114
|
-
link: "https://github.com/shenjianZ/React-docs-ui"
|
|
115
|
-
external: true
|
|
116
|
-
- title: "License"
|
|
117
|
-
link: "/license"
|
|
118
|
-
social:
|
|
119
|
-
- name: "email"
|
|
120
|
-
url: "mailto:contact@example.com"
|
|
121
|
-
icon: "mail"
|
|
122
|
-
- name: "github"
|
|
123
|
-
url: "https://github.com/your_github_id"
|
|
124
|
-
icon: "github"
|
|
125
|
-
# - name: "youtube"
|
|
126
|
-
# url: "https://youtube.com/@yourhandle"
|
|
127
|
-
# icon: "youtube"
|
|
128
|
-
# - name: "twitter"
|
|
129
|
-
# url: "https://twitter.com/yourhandle"
|
|
130
|
-
# icon: "twitter"
|
|
131
|
-
# - name: "discord"
|
|
132
|
-
# url: "https://discord.gg/yourinvite"
|
|
133
|
-
# icon: "discord"
|
|
134
|
-
# - name: "telegram"
|
|
135
|
-
# url: "https://t.me/yourhandle"
|
|
136
|
-
# icon: "telegram"
|
|
137
|
-
# - name: "tiktok"
|
|
138
|
-
# url: "https://tiktok.com/@yourhandle"
|
|
139
|
-
# icon: "tiktok"
|
|
140
|
-
- name: "bilibili"
|
|
141
|
-
url: "https://space.bilibili.com/your_bilibili_id"
|
|
142
|
-
icon: "bilibili"
|
|
143
|
-
- name: "qq"
|
|
144
|
-
url: "mqqapi://card/show_pslcard?src_type=internal&version=1&uin=your_qq_id&card_type=person&source=qrcode"
|
|
145
|
-
icon: "qq"
|
|
146
|
-
- name: "wechat"
|
|
147
|
-
url: "weixin://dl/add?your_wechat_id"
|
|
148
|
-
icon: "wechat"
|
|
149
|
-
# - name: "weibo"
|
|
150
|
-
# url: "https://weibo.com/yourhandle"
|
|
151
|
-
# icon: "weibo"
|
|
152
|
-
# - name: "douyin"
|
|
153
|
-
# url: "https://www.douyin.com/user/yourhandle"
|
|
154
|
-
# icon: "douyin"
|
|
155
|
-
# - name: "zhihu"
|
|
156
|
-
# url: "https://www.zhihu.com/people/yourhandle"
|
|
157
|
-
# icon: "zhihu"
|
|
158
|
-
|
|
159
|
-
# PWA Configuration
|
|
160
|
-
pwa:
|
|
161
|
-
enabled: true
|
|
162
|
-
name: "React Docs UI"
|
|
163
|
-
shortName: "ReactDocsUI"
|
|
164
|
-
description: "Beautiful documentation websites made simple"
|
|
165
|
-
themeColor: "#ffffff"
|
|
166
|
-
backgroundColor: "#ffffff"
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
# Configuration File (`site.yaml`) Explained
|
|
2
|
-
|
|
3
|
-
The project is configuration-driven. Most behavior is defined in `public/config/site.yaml`. This page documents every field using concise tables.
|
|
4
|
-
|
|
5
|
-
## Top-level keys
|
|
6
|
-
| Key | Purpose |
|
|
7
|
-
| :-- | :-- |
|
|
8
|
-
| `site` | Global metadata like title, description, logo, author |
|
|
9
|
-
| `navbar` | Top navigation bar (logo/title toggles, items, actions) |
|
|
10
|
-
| `sidebar` | Left navigation tree (collections/sections/children) |
|
|
11
|
-
| `theme` | Theme options (default mode, toggle) |
|
|
12
|
-
| `toc` | Article table of contents (enabled, levels, title) |
|
|
13
|
-
| `footer` | Footer links, socials, repository meta |
|
|
14
|
-
| `pwa` | Progressive Web App settings (reserved/optional) |
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## `site`
|
|
19
|
-
| Field | Type | Description | Example |
|
|
20
|
-
| :-- | :-- | :-- | :-- |
|
|
21
|
-
| `title` | string | Site title | `"React Docs UI Example"` |
|
|
22
|
-
| `description` | string | Short site description (SEO) | `"Beautiful docs made simple"` |
|
|
23
|
-
| `logo` | string or object | Logo to display. String can be emoji or image path. Object allows light/dark images. | `"📚"`, `"/images/logo.png"`, or `{ light: "/images/favicon.svg", dark: "/images/favicon-dark.svg" }` |
|
|
24
|
-
| `author` | string | Site author/organization | `"React Docs UI Team"` |
|
|
25
|
-
|
|
26
|
-
Logo formats supported:
|
|
27
|
-
- Emoji: `"🚀"`
|
|
28
|
-
- URL or public path: `"/images/logo.png"`
|
|
29
|
-
- Light/Dark object: `{ light, dark }`
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## `navbar`
|
|
34
|
-
| Field | Type | Description |
|
|
35
|
-
| :-- | :-- | :-- |
|
|
36
|
-
| `showLogo` | boolean | Show logo at top-left |
|
|
37
|
-
| `showTitle` | boolean | Show site title in navbar |
|
|
38
|
-
| `showLanguageSwitcher` | boolean | Show language switcher |
|
|
39
|
-
| `items` | array<Item> | Primary navigation links |
|
|
40
|
-
| `actions` | array<Action> | Right-side action buttons (e.g. GitHub) |
|
|
41
|
-
|
|
42
|
-
Item
|
|
43
|
-
| Field | Type | Description | Example |
|
|
44
|
-
| :-- | :-- | :-- | :-- |
|
|
45
|
-
| `title` | string | Link text | `"Guide"` |
|
|
46
|
-
| `link` | string | Path or URL. Internal paths start with `/`. | `"/guide"` |
|
|
47
|
-
| `external` | boolean (optional) | Open in new tab if true |
|
|
48
|
-
| `visible` | boolean (optional) | Conditionally hide/show |
|
|
49
|
-
|
|
50
|
-
Action
|
|
51
|
-
| Field | Type | Description | Example |
|
|
52
|
-
| :-- | :-- | :-- | :-- |
|
|
53
|
-
| `type` | `"github"` or `"custom"` (optional) | Predefined or custom action | `"github"` |
|
|
54
|
-
| `title` | string (optional) | Button text when `type` is `custom` |
|
|
55
|
-
| `link` | string | Destination URL |
|
|
56
|
-
| `icon` | string (optional) | Icon name for custom action |
|
|
57
|
-
| `enabled` | boolean (optional) | Toggle the action |
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## `sidebar`
|
|
62
|
-
| Field | Type | Description |
|
|
63
|
-
| :-- | :-- | :-- |
|
|
64
|
-
| `enabled` | boolean (optional) | Global toggle for sidebar |
|
|
65
|
-
| `collections` | record<string, Collection> | Map of top-level sections (e.g. `guide`) |
|
|
66
|
-
| `sections` | Section[] (legacy, optional) | Backward-compatible single-tree definition |
|
|
67
|
-
|
|
68
|
-
Collection
|
|
69
|
-
| Field | Type | Description |
|
|
70
|
-
| :-- | :-- | :-- |
|
|
71
|
-
| `sections` | Section[] | Grouped side-nav sections |
|
|
72
|
-
|
|
73
|
-
Section
|
|
74
|
-
| Field | Type | Description | Example |
|
|
75
|
-
| :-- | :-- | :-- | :-- |
|
|
76
|
-
| `title` | string | Section title | `"Getting Started"` |
|
|
77
|
-
| `path` | string | Base path that expands/highlights this section | `"/guide"` |
|
|
78
|
-
| `children` | Child[] (optional) | Leaf links under the section |
|
|
79
|
-
|
|
80
|
-
Child
|
|
81
|
-
| Field | Type | Description | Example |
|
|
82
|
-
| :-- | :-- | :-- | :-- |
|
|
83
|
-
| `title` | string | Link text | `"Introduction"` |
|
|
84
|
-
| `path` | string | Full page path | `"/guide/introduction"` |
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## `theme`
|
|
89
|
-
| Field | Type | Description | Options | Default |
|
|
90
|
-
| :-- | :-- | :-- | :-- | :-- |
|
|
91
|
-
| `defaultMode` | string | Default color mode | `light`, `dark`, `auto` | `auto` |
|
|
92
|
-
| `allowToggle` | boolean | Allow user theme switching | `true`/`false` | `true` |
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## `toc`
|
|
97
|
-
| Field | Type | Description | Example |
|
|
98
|
-
| :-- | :-- | :-- | :-- |
|
|
99
|
-
| `enabled` | boolean | Enable page table of contents | `true` |
|
|
100
|
-
| `maxLevel` | number (1-6) | Max heading depth to show | `3` |
|
|
101
|
-
| `title` | string | TOC panel title | `"On This Page"` |
|
|
102
|
-
|
|
103
|
-
Note: Per-page TOC visibility/anchors are also affected by page frontmatter.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## `footer`
|
|
108
|
-
| Field | Type | Description |
|
|
109
|
-
| :-- | :-- | :-- |
|
|
110
|
-
| `enabled` | boolean | Show footer |
|
|
111
|
-
| `copyright` | string | Copyright text |
|
|
112
|
-
| `repository` | Repository (optional) | Repo info used for links like “Edit this page” |
|
|
113
|
-
| `lastUpdated` | string (optional) | Site/content last update date |
|
|
114
|
-
| `links` | Link[] (optional) | Footer link columns |
|
|
115
|
-
| `social` | Social[] (optional) | Social icon links |
|
|
116
|
-
|
|
117
|
-
Repository
|
|
118
|
-
| Field | Type | Description | Example |
|
|
119
|
-
| :-- | :-- | :-- | :-- |
|
|
120
|
-
| `url` | string | Repository URL | `"https://github.com/user/repo"` |
|
|
121
|
-
| `branch` | string | Docs branch | `"main"` |
|
|
122
|
-
|
|
123
|
-
Link
|
|
124
|
-
| Field | Type | Description |
|
|
125
|
-
| :-- | :-- | :-- |
|
|
126
|
-
| `title` | string | Link title |
|
|
127
|
-
| `link` | string | Path or URL |
|
|
128
|
-
| `external` | boolean (optional) | Open in new tab |
|
|
129
|
-
|
|
130
|
-
Social
|
|
131
|
-
| Field | Type | Description |
|
|
132
|
-
| :-- | :-- | :-- |
|
|
133
|
-
| `name` | string | Provider key (e.g. `github`, `twitter`, `bilibili`) |
|
|
134
|
-
| `url` | string | Profile or link URL |
|
|
135
|
-
| `icon` | string | Icon name |
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## `pwa` (optional)
|
|
140
|
-
| Field | Type | Description |
|
|
141
|
-
| :-- | :-- | :-- |
|
|
142
|
-
| `enabled` | boolean | Enable PWA features (reserved) |
|
|
143
|
-
| `name` | string | App name |
|
|
144
|
-
| `shortName` | string | Short app name |
|
|
145
|
-
| `description` | string | App description |
|
|
146
|
-
| `themeColor` | string | Theme color |
|
|
147
|
-
| `backgroundColor` | string | Background color |
|
|
148
|
-
|
|
149
|
-
---
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# Installation
|
|
2
|
-
|
|
3
|
-
## Prerequisites
|
|
4
|
-
|
|
5
|
-
Before you begin, make sure your development environment meets the following requirements:
|
|
6
|
-
|
|
7
|
-
- **Node.js**: Version `>= 18.0.0`
|
|
8
|
-
- **Package Manager**: `npm`, `yarn`, or `pnpm`
|
|
9
|
-
|
|
10
|
-
## Recommended Method: Use the Scaffolding Tool
|
|
11
|
-
|
|
12
|
-
We strongly recommend using the official `create-react-docs-ui` scaffolding tool to create your new documentation project. This is the fastest and easiest way to ensure all configurations are set up correctly.
|
|
13
|
-
|
|
14
|
-
1. **Run the creation command**:
|
|
15
|
-
```bash
|
|
16
|
-
npx create-react-docs-ui@latest my-docs
|
|
17
|
-
```
|
|
18
|
-
This will create a new folder named `my-docs` in the current directory.
|
|
19
|
-
|
|
20
|
-
2. **Enter the project and install dependencies**:
|
|
21
|
-
```bash
|
|
22
|
-
cd my-docs
|
|
23
|
-
npm install
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
3. **Start the development server**:
|
|
27
|
-
```bash
|
|
28
|
-
npm run dev
|
|
29
|
-
```
|
|
30
|
-
Your documentation website is now running at `http://localhost:5173` (or another available port).
|
|
31
|
-
|
|
32
|
-
## Manual Installation (for existing projects)
|
|
33
|
-
|
|
34
|
-
If you want to manually integrate `react-docs-ui` into an existing Vite + React project, follow these steps:
|
|
35
|
-
|
|
36
|
-
1. **Install the core library**:
|
|
37
|
-
```bash
|
|
38
|
-
npm install react-docs-ui
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
2. **Create configuration files**:
|
|
42
|
-
In your `public` directory, create a `config` folder, and inside it, create a `site.yaml` file. You can copy a basic template from [here](https://github.com/shenjianZ/react-docs-ui/blob/main/react-docs-ui/public/config/site.yaml).
|
|
43
|
-
|
|
44
|
-
3. **Create the documentation directory**:
|
|
45
|
-
In your `public` directory, create a `docs` folder to store your Markdown files. For example: `public/docs/en/index.md`.
|
|
46
|
-
|
|
47
|
-
4. **Modify the application entry file**:
|
|
48
|
-
Update your `src/main.tsx` (or `main.jsx`) file to render the `DocsApp` component to initialize the application.
|
|
49
|
-
|
|
50
|
-
```tsx
|
|
51
|
-
// src/main.tsx
|
|
52
|
-
import React from 'react'
|
|
53
|
-
import ReactDOM from 'react-dom/client'
|
|
54
|
-
import { DocsApp } from 'react-docs-ui'
|
|
55
|
-
import 'react-docs-ui/dist/style.css' // Import core styles
|
|
56
|
-
|
|
57
|
-
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
58
|
-
<React.StrictMode>
|
|
59
|
-
<DocsApp />
|
|
60
|
-
</React.StrictMode>,
|
|
61
|
-
)
|
|
62
|
-
```
|
|
63
|
-
5. **Ensure your `index.html` contains `<div id="root"></div>`**
|