create-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/package.json +6 -4
- package/template/index.html +13 -15
- package/template/package.json +32 -30
- package/template/public/config/site.en.yaml +28 -1
- package/template/public/config/site.yaml +170 -145
- package/template/src/main.tsx +14 -16
- package/template/vite.config.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-react-docs-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
"boilerplate",
|
|
35
35
|
"create-tool"
|
|
36
36
|
],
|
|
37
|
-
"license": "MIT"
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=18"
|
|
40
|
+
},
|
|
41
|
+
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748"
|
|
38
42
|
}
|
|
39
|
-
|
|
40
|
-
|
package/template/index.html
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</html>
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/images/favicon.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>React Docs</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/template/package.json
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "my-react-docs-project",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react-docs-ui": "^0.3.0",
|
|
13
|
+
"react": "^19.0.0",
|
|
14
|
+
"react-dom": "^19.0.0",
|
|
15
|
+
"react-router-dom": "^7.8.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/debug": "^4.1.12",
|
|
19
|
+
"@types/hast": "^3.0.4",
|
|
20
|
+
"@types/mdast": "^4.0.4",
|
|
21
|
+
"@types/ms": "^2.1.0",
|
|
22
|
+
"@types/react": "^19.1.9",
|
|
23
|
+
"@types/react-dom": "^19.1.7",
|
|
24
|
+
"@types/unist": "^3.0.3",
|
|
25
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
26
|
+
"typescript": "~5.8.3",
|
|
27
|
+
"vite": "^7.1.0"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -155,4 +155,31 @@ pwa:
|
|
|
155
155
|
shortName: "ReactDocsUI"
|
|
156
156
|
description: "Beautiful documentation websites made simple"
|
|
157
157
|
themeColor: "#ffffff"
|
|
158
|
-
backgroundColor: "#ffffff"
|
|
158
|
+
backgroundColor: "#ffffff"
|
|
159
|
+
|
|
160
|
+
# Context Menu Configuration
|
|
161
|
+
contextMenu:
|
|
162
|
+
# Global switch, set to false to completely disable context menu
|
|
163
|
+
enabled: true
|
|
164
|
+
|
|
165
|
+
# Page group menu items configuration
|
|
166
|
+
page:
|
|
167
|
+
copyUrl: true # Copy current URL
|
|
168
|
+
copyTitle: false # Copy page title
|
|
169
|
+
copyMarkdownLink: true # Copy Markdown link
|
|
170
|
+
openInNewTab: false # Open in new tab
|
|
171
|
+
reload: true # Refresh
|
|
172
|
+
printPage: true # Print page
|
|
173
|
+
scrollToTop: true # Scroll to top
|
|
174
|
+
scrollToBottom: true # Scroll to bottom
|
|
175
|
+
|
|
176
|
+
# Site group menu items configuration
|
|
177
|
+
site:
|
|
178
|
+
goHome: true # Go to home
|
|
179
|
+
quickNav: false # Quick navigation
|
|
180
|
+
language: false # Language switch
|
|
181
|
+
|
|
182
|
+
# Appearance group menu items configuration
|
|
183
|
+
appearance:
|
|
184
|
+
theme: false # Theme switch
|
|
185
|
+
resetThemePref: false # Reset theme preference
|
|
@@ -1,166 +1,191 @@
|
|
|
1
1
|
# 网站基本配置
|
|
2
2
|
site:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
15
|
# 顶部导航配置
|
|
16
16
|
navbar:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
30
|
|
|
31
31
|
# 侧边栏导航配置
|
|
32
32
|
sidebar:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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"
|
|
49
48
|
|
|
50
49
|
# Theme Configuration
|
|
51
50
|
theme:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
# Default theme mode: 'light' | 'dark' | 'auto'
|
|
52
|
+
# light: Force light mode
|
|
53
|
+
# dark: Force dark mode
|
|
54
|
+
# auto: Follow system preference (default)
|
|
55
|
+
defaultMode: "auto"
|
|
56
|
+
|
|
57
|
+
# Allow users to toggle theme (show theme toggle button)
|
|
58
|
+
allowToggle: true
|
|
61
59
|
|
|
62
60
|
# Table of Contents Configuration
|
|
63
61
|
toc:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
# Maximum heading level to display in TOC (1-6)
|
|
63
|
+
maxLevel: 3
|
|
64
|
+
|
|
65
|
+
# Enable table of contents
|
|
66
|
+
enabled: true
|
|
67
|
+
|
|
68
|
+
# TOC title
|
|
69
|
+
title: "本页目录"
|
|
72
70
|
|
|
73
71
|
# Footer Configuration
|
|
74
72
|
footer:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
73
|
+
enabled: true
|
|
74
|
+
copyright: "© 2025 React Docs UI. All rights reserved."
|
|
75
|
+
repository:
|
|
76
|
+
url: "https://github.com/shenjianZ/React-docs-ui"
|
|
77
|
+
branch: "master"
|
|
78
|
+
lastUpdated: "2025-08-14"
|
|
79
|
+
version: "v0.1.7"
|
|
80
|
+
groups:
|
|
81
|
+
- title: "社区"
|
|
82
|
+
items:
|
|
83
|
+
- title: "讨论区"
|
|
84
|
+
link: "https://github.com/shenjianZ/React-docs-ui/discussions"
|
|
85
|
+
external: true
|
|
86
|
+
- title: "问题反馈"
|
|
87
|
+
link: "https://github.com/shenjianZ/React-docs-ui/issues"
|
|
88
|
+
external: true
|
|
89
|
+
- title: "贡献指南"
|
|
90
|
+
link: "https://github.com/shenjianZ/React-docs-ui/blob/master/CONTRIBUTING.md"
|
|
91
|
+
external: true
|
|
92
|
+
- title: "版本发布"
|
|
93
|
+
link: "https://github.com/shenjianZ/React-docs-ui/releases"
|
|
94
|
+
external: true
|
|
95
|
+
- title: "帮助支持"
|
|
96
|
+
items:
|
|
97
|
+
- title: "示例"
|
|
98
|
+
link: "/guide/quick-start"
|
|
99
|
+
- title: "源代码"
|
|
100
|
+
link: "https://github.com/shenjianZ/React-docs-ui"
|
|
101
|
+
external: true
|
|
102
|
+
- title: "开源许可"
|
|
103
|
+
link: "https://github.com/shenjianZ/React-docs-ui/blob/master/LICENSE"
|
|
104
|
+
external: true
|
|
105
|
+
- title: "回到顶部"
|
|
106
|
+
link: "#"
|
|
107
|
+
action: "scrollTop"
|
|
108
|
+
links:
|
|
109
|
+
- title: "Documentation"
|
|
110
|
+
link: "/guide/introduction"
|
|
111
|
+
- title: "GitHub"
|
|
102
112
|
link: "https://github.com/shenjianZ/React-docs-ui"
|
|
103
113
|
external: true
|
|
104
|
-
- title: "
|
|
105
|
-
link: "
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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"
|
|
114
|
+
- title: "License"
|
|
115
|
+
link: "/license"
|
|
116
|
+
social:
|
|
117
|
+
- name: "email"
|
|
118
|
+
url: "mailto:contact@example.com"
|
|
119
|
+
icon: "mail"
|
|
120
|
+
- name: "github"
|
|
121
|
+
url: "https://github.com/your_github_id"
|
|
122
|
+
icon: "github"
|
|
123
|
+
# - name: "youtube"
|
|
124
|
+
# url: "https://youtube.com/@yourhandle"
|
|
125
|
+
# icon: "youtube"
|
|
126
|
+
# - name: "twitter"
|
|
127
|
+
# url: "https://twitter.com/yourhandle"
|
|
128
|
+
# icon: "twitter"
|
|
129
|
+
# - name: "discord"
|
|
130
|
+
# url: "https://discord.gg/yourinvite"
|
|
131
|
+
# icon: "discord"
|
|
132
|
+
# - name: "telegram"
|
|
133
|
+
# url: "https://t.me/yourhandle"
|
|
134
|
+
# icon: "telegram"
|
|
135
|
+
# - name: "tiktok"
|
|
136
|
+
# url: "https://tiktok.com/@yourhandle"
|
|
137
|
+
# icon: "tiktok"
|
|
138
|
+
- name: "bilibili"
|
|
139
|
+
url: "https://space.bilibili.com/your_bilibili_id"
|
|
140
|
+
icon: "bilibili"
|
|
141
|
+
- name: "qq"
|
|
142
|
+
url: "mqqapi://card/show_pslcard?src_type=internal&version=1&uin=your_qq_id&card_type=person&source=qrcode"
|
|
143
|
+
icon: "qq"
|
|
144
|
+
- name: "wechat"
|
|
145
|
+
url: "weixin://dl/add?your_wechat_id"
|
|
146
|
+
icon: "wechat"
|
|
147
|
+
# - name: "weibo"
|
|
148
|
+
# url: "https://weibo.com/yourhandle"
|
|
149
|
+
# icon: "weibo"
|
|
150
|
+
# - name: "douyin"
|
|
151
|
+
# url: "https://www.douyin.com/user/yourhandle"
|
|
152
|
+
# icon: "douyin"
|
|
153
|
+
# - name: "zhihu"
|
|
154
|
+
# url: "https://www.zhihu.com/people/yourhandle"
|
|
155
|
+
# icon: "zhihu"
|
|
158
156
|
|
|
159
157
|
# PWA Configuration
|
|
160
158
|
pwa:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
enabled: true
|
|
160
|
+
name: "React Docs UI"
|
|
161
|
+
shortName: "ReactDocsUI"
|
|
162
|
+
description: "Beautiful documentation websites made simple"
|
|
163
|
+
themeColor: "#ffffff"
|
|
164
|
+
backgroundColor: "#ffffff"
|
|
165
|
+
|
|
166
|
+
# 右键菜单配置
|
|
167
|
+
contextMenu:
|
|
168
|
+
# 全局开关,false 则完全禁用右键菜单
|
|
169
|
+
enabled: true
|
|
170
|
+
|
|
171
|
+
# 页面组菜单项配置
|
|
172
|
+
page:
|
|
173
|
+
copyUrl: true # 复制当前链接
|
|
174
|
+
copyTitle: false # 复制页面标题
|
|
175
|
+
copyMarkdownLink: false # 复制 Markdown 链接
|
|
176
|
+
openInNewTab: false # 在新标签页打开
|
|
177
|
+
reload: true # 刷新
|
|
178
|
+
printPage: true # 打印页面
|
|
179
|
+
scrollToTop: true # 回到顶部
|
|
180
|
+
scrollToBottom: true # 滚动到底部
|
|
181
|
+
|
|
182
|
+
# 站点组菜单项配置
|
|
183
|
+
site:
|
|
184
|
+
goHome: true # 返回首页
|
|
185
|
+
quickNav: false # 快速跳转
|
|
186
|
+
language: false # 语言切换
|
|
187
|
+
|
|
188
|
+
# 外观组菜单项配置
|
|
189
|
+
appearance:
|
|
190
|
+
theme: false # 主题切换
|
|
191
|
+
resetThemePref: false # 重置主题偏好
|
package/template/src/main.tsx
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import ReactDOM from "react-dom/client"
|
|
3
|
-
|
|
4
|
-
import "react-docs-ui/dist/react-docs-ui.css"
|
|
5
|
-
import { DocsApp } from "react-docs-ui"
|
|
6
|
-
// import "../../../react-docs-ui/dist/react-docs-ui.css"
|
|
7
|
-
// @ts-ignore using local built ES module for development
|
|
8
|
-
// import { DocsApp } from "../../../react-docs-ui/dist/react-docs-ui.es.js"
|
|
9
|
-
|
|
10
|
-
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOM from "react-dom/client";
|
|
3
|
+
|
|
4
|
+
import "react-docs-ui/dist/react-docs-ui.css";
|
|
5
|
+
import { DocsApp } from "react-docs-ui";
|
|
6
|
+
// import "../../../react-docs-ui/dist/react-docs-ui.css";
|
|
7
|
+
// @ts-ignore using local built ES module for development
|
|
8
|
+
// import { DocsApp } from "../../../react-docs-ui/dist/react-docs-ui.es.js";
|
|
9
|
+
|
|
10
|
+
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
11
|
+
<React.StrictMode>
|
|
12
|
+
<DocsApp />
|
|
13
|
+
</React.StrictMode>,
|
|
14
|
+
);
|