create-react-docs-ui 0.2.0 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-react-docs-ui",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,15 +1,13 @@
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>Docs</title>
8
- </head>
9
- <body>
10
- <div id="root"></div>
11
- <script type="module" src="/src/main.tsx"></script>
12
- </body>
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>
@@ -1,32 +1,32 @@
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.2.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
- }
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
+ }
@@ -1,193 +1,191 @@
1
1
  # 网站基本配置
2
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
-
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
- 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
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
- 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
-
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
- # 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
-
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
- # 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: "本页目录"
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
- 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: "源代码"
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: "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"
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
- enabled: true
162
- name: "React Docs UI"
163
- shortName: "ReactDocsUI"
164
- description: "Beautiful documentation websites made simple"
165
- themeColor: "#ffffff"
166
- backgroundColor: "#ffffff"
159
+ enabled: true
160
+ name: "React Docs UI"
161
+ shortName: "ReactDocsUI"
162
+ description: "Beautiful documentation websites made simple"
163
+ themeColor: "#ffffff"
164
+ backgroundColor: "#ffffff"
167
165
 
168
166
  # 右键菜单配置
169
167
  contextMenu:
170
- # 全局开关,false 则完全禁用右键菜单
171
- enabled: true
168
+ # 全局开关,false 则完全禁用右键菜单
169
+ enabled: true
172
170
 
173
- # 页面组菜单项配置
174
- page:
175
- copyUrl: true # 复制当前链接
176
- copyTitle: false # 复制页面标题
177
- copyMarkdownLink: true # 复制 Markdown 链接
178
- openInNewTab: false # 在新标签页打开
179
- reload: true # 刷新
180
- printPage: true # 打印页面
181
- scrollToTop: true # 回到顶部
182
- scrollToBottom: true # 滚动到底部
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 # 滚动到底部
183
181
 
184
- # 站点组菜单项配置
185
- site:
186
- goHome: true # 返回首页
187
- quickNav: false # 快速跳转
188
- language: false # 语言切换
182
+ # 站点组菜单项配置
183
+ site:
184
+ goHome: true # 返回首页
185
+ quickNav: false # 快速跳转
186
+ language: false # 语言切换
189
187
 
190
- # 外观组菜单项配置
191
- appearance:
192
- theme: false # 主题切换
193
- resetThemePref: false # 重置主题偏好
188
+ # 外观组菜单项配置
189
+ appearance:
190
+ theme: false # 主题切换
191
+ resetThemePref: false # 重置主题偏好
@@ -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
- <React.StrictMode>
12
- <DocsApp />
13
- </React.StrictMode>
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
+ );
@@ -10,6 +10,10 @@ export default defineConfig({
10
10
  buffer: "buffer/",
11
11
  },
12
12
  },
13
+ server: {
14
+ host: "0.0.0.0",
15
+ port: 5173,
16
+ },
13
17
  })
14
18
 
15
19