react-docs-ui 0.1.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/README.md +88 -0
- package/dist/config/ai.json +60 -0
- package/dist/config/site.en.yaml +137 -0
- package/dist/config/site.yaml +137 -0
- package/dist/docs/en/guide/configuration.md +69 -0
- package/dist/docs/en/guide/installation.md +139 -0
- package/dist/docs/en/guide/introduction.md +50 -0
- package/dist/docs/en/guide/quick-start.md +217 -0
- package/dist/docs/en/guide.md +31 -0
- package/dist/docs/en/index.md +58 -0
- package/dist/docs/zh-cn/guide/configuration.md +169 -0
- package/dist/docs/zh-cn/guide/installation.md +66 -0
- package/dist/docs/zh-cn/guide/introduction.md +29 -0
- package/dist/docs/zh-cn/guide/quick-start.md +100 -0
- package/dist/docs/zh-cn/guide.md +10 -0
- package/dist/docs/zh-cn/index.md +34 -0
- package/dist/images/favicon-dark.svg +7 -0
- package/dist/images/favicon.svg +7 -0
- package/dist/images/placeholder.md +25 -0
- package/dist/react-docs-ui.css +1 -0
- package/dist/react-docs-ui.es.js +38826 -0
- package/dist/react-docs-ui.es.js.map +1 -0
- package/dist/react-docs-ui.umd.js +202 -0
- package/dist/react-docs-ui.umd.js.map +1 -0
- package/package.json +83 -0
package/README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# React Docs UI (Vite)
|
|
2
|
+
|
|
3
|
+
This package can be used as a library, similar to `vue-docs-ui`.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @react-docs-ui-vite/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import "@react-docs-ui-vite/core/dist/react-docs-ui.css"
|
|
15
|
+
import { DocsLayout, HeaderNav, SidebarNav, TableOfContents } from "@react-docs-ui-vite/core"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
See `public/config/site.yaml` and `public/docs` in this repo for an example content structure.
|
|
19
|
+
|
|
20
|
+
# React + TypeScript + Vite
|
|
21
|
+
|
|
22
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
23
|
+
|
|
24
|
+
Currently, two official plugins are available:
|
|
25
|
+
|
|
26
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
27
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
28
|
+
|
|
29
|
+
## Expanding the ESLint configuration
|
|
30
|
+
|
|
31
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
export default tseslint.config([
|
|
35
|
+
globalIgnores(['dist']),
|
|
36
|
+
{
|
|
37
|
+
files: ['**/*.{ts,tsx}'],
|
|
38
|
+
extends: [
|
|
39
|
+
// Other configs...
|
|
40
|
+
|
|
41
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
42
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
43
|
+
// Alternatively, use this for stricter rules
|
|
44
|
+
...tseslint.configs.strictTypeChecked,
|
|
45
|
+
// Optionally, add this for stylistic rules
|
|
46
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
47
|
+
|
|
48
|
+
// Other configs...
|
|
49
|
+
],
|
|
50
|
+
languageOptions: {
|
|
51
|
+
parserOptions: {
|
|
52
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
53
|
+
tsconfigRootDir: import.meta.dirname,
|
|
54
|
+
},
|
|
55
|
+
// other options...
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
])
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
// eslint.config.js
|
|
65
|
+
import reactX from 'eslint-plugin-react-x'
|
|
66
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
67
|
+
|
|
68
|
+
export default tseslint.config([
|
|
69
|
+
globalIgnores(['dist']),
|
|
70
|
+
{
|
|
71
|
+
files: ['**/*.{ts,tsx}'],
|
|
72
|
+
extends: [
|
|
73
|
+
// Other configs...
|
|
74
|
+
// Enable lint rules for React
|
|
75
|
+
reactX.configs['recommended-typescript'],
|
|
76
|
+
// Enable lint rules for React DOM
|
|
77
|
+
reactDom.configs.recommended,
|
|
78
|
+
],
|
|
79
|
+
languageOptions: {
|
|
80
|
+
parserOptions: {
|
|
81
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
82
|
+
tsconfigRootDir: import.meta.dirname,
|
|
83
|
+
},
|
|
84
|
+
// other options...
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
])
|
|
88
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Website Configuration
|
|
2
|
+
site:
|
|
3
|
+
title: "Vue Docs UI Example"
|
|
4
|
+
description: "Example documentation website built with Vue 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: "Vue 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/vue-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 Vue Docs UI. All rights reserved."
|
|
77
|
+
repository:
|
|
78
|
+
url: "https://github.com/your_github_id/your_repo_name"
|
|
79
|
+
branch: "master"
|
|
80
|
+
lastUpdated: "2024-12-19"
|
|
81
|
+
links:
|
|
82
|
+
- title: "Documentation"
|
|
83
|
+
link: "/guide/introduction"
|
|
84
|
+
- title: "GitHub"
|
|
85
|
+
link: "https://github.com/your_github_id/your_repo_name"
|
|
86
|
+
external: true
|
|
87
|
+
- title: "License"
|
|
88
|
+
link: "/license"
|
|
89
|
+
social:
|
|
90
|
+
- name: "email"
|
|
91
|
+
url: "mailto:contact@example.com"
|
|
92
|
+
icon: "mail"
|
|
93
|
+
- name: "github"
|
|
94
|
+
url: "https://github.com/your_github_id"
|
|
95
|
+
icon: "github"
|
|
96
|
+
# - name: "youtube"
|
|
97
|
+
# url: "https://youtube.com/@yourhandle"
|
|
98
|
+
# icon: "youtube"
|
|
99
|
+
# - name: "twitter"
|
|
100
|
+
# url: "https://twitter.com/yourhandle"
|
|
101
|
+
# icon: "twitter"
|
|
102
|
+
# - name: "discord"
|
|
103
|
+
# url: "https://discord.gg/yourinvite"
|
|
104
|
+
# icon: "discord"
|
|
105
|
+
# - name: "telegram"
|
|
106
|
+
# url: "https://t.me/yourhandle"
|
|
107
|
+
# icon: "telegram"
|
|
108
|
+
# - name: "tiktok"
|
|
109
|
+
# url: "https://tiktok.com/@yourhandle"
|
|
110
|
+
# icon: "tiktok"
|
|
111
|
+
- name: "bilibili"
|
|
112
|
+
url: "https://space.bilibili.com/your_bilibili_id"
|
|
113
|
+
icon: "bilibili"
|
|
114
|
+
- name: "qq"
|
|
115
|
+
url: "mqqapi://card/show_pslcard?src_type=internal&version=1&uin=your_qq_id&card_type=person&source=qrcode"
|
|
116
|
+
icon: "qq"
|
|
117
|
+
- name: "wechat"
|
|
118
|
+
url: "weixin://dl/add?your_wechat_id"
|
|
119
|
+
icon: "wechat"
|
|
120
|
+
# - name: "weibo"
|
|
121
|
+
# url: "https://weibo.com/yourhandle"
|
|
122
|
+
# icon: "weibo"
|
|
123
|
+
# - name: "douyin"
|
|
124
|
+
# url: "https://www.douyin.com/user/yourhandle"
|
|
125
|
+
# icon: "douyin"
|
|
126
|
+
# - name: "zhihu"
|
|
127
|
+
# url: "https://www.zhihu.com/people/yourhandle"
|
|
128
|
+
# icon: "zhihu"
|
|
129
|
+
|
|
130
|
+
# PWA Configuration
|
|
131
|
+
pwa:
|
|
132
|
+
enabled: false
|
|
133
|
+
name: "Vue Docs UI"
|
|
134
|
+
shortName: "VueDocsUI"
|
|
135
|
+
description: "Beautiful documentation websites made simple"
|
|
136
|
+
themeColor: "#ffffff"
|
|
137
|
+
backgroundColor: "#ffffff"
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# 网站基本配置
|
|
2
|
+
site:
|
|
3
|
+
title: "Vue Docs UI 示例项目"
|
|
4
|
+
description: "基于 Vue 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: "Vue 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/vue-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: "© 2024 Vue Docs UI. All rights reserved."
|
|
77
|
+
repository:
|
|
78
|
+
url: "https://github.com/your_github_id/your_repo_name"
|
|
79
|
+
branch: "master"
|
|
80
|
+
lastUpdated: "2024-12-19"
|
|
81
|
+
links:
|
|
82
|
+
- title: "Documentation"
|
|
83
|
+
link: "/guide/introduction"
|
|
84
|
+
- title: "GitHub"
|
|
85
|
+
link: "https://github.com/your_github_id/your_repo_name"
|
|
86
|
+
external: true
|
|
87
|
+
- title: "License"
|
|
88
|
+
link: "/license"
|
|
89
|
+
social:
|
|
90
|
+
- name: "email"
|
|
91
|
+
url: "mailto:contact@example.com"
|
|
92
|
+
icon: "mail"
|
|
93
|
+
- name: "github"
|
|
94
|
+
url: "https://github.com/your_github_id"
|
|
95
|
+
icon: "github"
|
|
96
|
+
# - name: "youtube"
|
|
97
|
+
# url: "https://youtube.com/@yourhandle"
|
|
98
|
+
# icon: "youtube"
|
|
99
|
+
# - name: "twitter"
|
|
100
|
+
# url: "https://twitter.com/yourhandle"
|
|
101
|
+
# icon: "twitter"
|
|
102
|
+
# - name: "discord"
|
|
103
|
+
# url: "https://discord.gg/yourinvite"
|
|
104
|
+
# icon: "discord"
|
|
105
|
+
# - name: "telegram"
|
|
106
|
+
# url: "https://t.me/yourhandle"
|
|
107
|
+
# icon: "telegram"
|
|
108
|
+
# - name: "tiktok"
|
|
109
|
+
# url: "https://tiktok.com/@yourhandle"
|
|
110
|
+
# icon: "tiktok"
|
|
111
|
+
- name: "bilibili"
|
|
112
|
+
url: "https://space.bilibili.com/your_bilibili_id"
|
|
113
|
+
icon: "bilibili"
|
|
114
|
+
- name: "qq"
|
|
115
|
+
url: "mqqapi://card/show_pslcard?src_type=internal&version=1&uin=your_qq_id&card_type=person&source=qrcode"
|
|
116
|
+
icon: "qq"
|
|
117
|
+
- name: "wechat"
|
|
118
|
+
url: "weixin://dl/add?your_wechat_id"
|
|
119
|
+
icon: "wechat"
|
|
120
|
+
# - name: "weibo"
|
|
121
|
+
# url: "https://weibo.com/yourhandle"
|
|
122
|
+
# icon: "weibo"
|
|
123
|
+
# - name: "douyin"
|
|
124
|
+
# url: "https://www.douyin.com/user/yourhandle"
|
|
125
|
+
# icon: "douyin"
|
|
126
|
+
# - name: "zhihu"
|
|
127
|
+
# url: "https://www.zhihu.com/people/yourhandle"
|
|
128
|
+
# icon: "zhihu"
|
|
129
|
+
|
|
130
|
+
# PWA Configuration
|
|
131
|
+
pwa:
|
|
132
|
+
enabled: true
|
|
133
|
+
name: "Vue Docs UI"
|
|
134
|
+
shortName: "VueDocsUI"
|
|
135
|
+
description: "Beautiful documentation websites made simple"
|
|
136
|
+
themeColor: "#ffffff"
|
|
137
|
+
backgroundColor: "#ffffff"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
## Configuration Overview
|
|
4
|
+
|
|
5
|
+
Vue Docs UI provides flexible configuration options that allow you to customize the appearance and behavior of your documentation website.
|
|
6
|
+
|
|
7
|
+
## Basic Configuration
|
|
8
|
+
|
|
9
|
+
### site.yaml File
|
|
10
|
+
|
|
11
|
+
The configuration file is located at `public/config/site.yaml` and contains the following main sections:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
# Website Configuration
|
|
15
|
+
site:
|
|
16
|
+
title: "Vue Docs UI"
|
|
17
|
+
description: "Beautiful documentation websites made simple"
|
|
18
|
+
logo: "📚"
|
|
19
|
+
author: "Vue Docs UI Team"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Navigation Bar Configuration
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
navbar:
|
|
26
|
+
items:
|
|
27
|
+
- title: "Home"
|
|
28
|
+
link: "/"
|
|
29
|
+
active: true
|
|
30
|
+
- title: "Documentation"
|
|
31
|
+
link: "/guide"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Sidebar Configuration
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
sidebar:
|
|
38
|
+
sections:
|
|
39
|
+
- title: "Getting Started"
|
|
40
|
+
path: "/guide"
|
|
41
|
+
children:
|
|
42
|
+
- title: "Introduction"
|
|
43
|
+
path: "/guide/introduction"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Theme Configuration
|
|
47
|
+
|
|
48
|
+
### Color Customization
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
theme:
|
|
52
|
+
colors:
|
|
53
|
+
primary: "#3b82f6"
|
|
54
|
+
secondary: "#64748b"
|
|
55
|
+
accent: "#06b6d4"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Font Configuration
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
theme:
|
|
62
|
+
fonts:
|
|
63
|
+
primary: "Inter, -apple-system, BlinkMacSystemFont, sans-serif"
|
|
64
|
+
mono: "JetBrains Mono, Consolas, monospace"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Advanced Configuration
|
|
68
|
+
|
|
69
|
+
For more advanced configuration options, please refer to the related documentation.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
Get Vue Docs UI up and running in your project with these simple steps.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
Before you begin, make sure you have the following installed:
|
|
7
|
+
|
|
8
|
+
- **Node.js** 14.18+ or 16+
|
|
9
|
+
- **npm** 6+ or **yarn** 1.22+
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
The fastest way to get started is using our CLI tool:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Create a new project
|
|
17
|
+
npm create vue-docs-ui@latest my-docs
|
|
18
|
+
|
|
19
|
+
# Navigate to your project
|
|
20
|
+
cd my-docs
|
|
21
|
+
|
|
22
|
+
# Install dependencies
|
|
23
|
+
npm install
|
|
24
|
+
|
|
25
|
+
# Start the development server
|
|
26
|
+
npm run dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Your documentation website will be running at `http://localhost:5173`!
|
|
30
|
+
|
|
31
|
+
## Manual Installation
|
|
32
|
+
|
|
33
|
+
If you prefer to set up Vue Docs UI manually in an existing project:
|
|
34
|
+
|
|
35
|
+
### 1. Install Vue Docs UI
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install vue-docs-ui
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 2. Create Your App
|
|
42
|
+
|
|
43
|
+
Create a `main.ts` file:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { createApp } from 'vue'
|
|
47
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
48
|
+
import App from './App.vue'
|
|
49
|
+
|
|
50
|
+
const router = createRouter({
|
|
51
|
+
history: createWebHistory(),
|
|
52
|
+
routes: [
|
|
53
|
+
{ path: '/:pathMatch(.*)*', redirect: '/' }
|
|
54
|
+
]
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const app = createApp(App)
|
|
58
|
+
app.use(router)
|
|
59
|
+
app.mount('#app')
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3. Create App Component
|
|
63
|
+
|
|
64
|
+
Create an `App.vue` file:
|
|
65
|
+
|
|
66
|
+
```vue
|
|
67
|
+
<template>
|
|
68
|
+
<DocsLayout />
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script setup lang="ts">
|
|
72
|
+
import { DocsLayout } from 'vue-docs-ui'
|
|
73
|
+
import 'vue-docs-ui/style.css'
|
|
74
|
+
</script>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 4. Configure Your Site
|
|
78
|
+
|
|
79
|
+
Create a `public/config/site.yaml` file with your site configuration:
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
site:
|
|
83
|
+
title: "My Documentation"
|
|
84
|
+
description: "My awesome documentation website"
|
|
85
|
+
logo: "📚"
|
|
86
|
+
author: "Your Name"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 5. Add Your Content
|
|
90
|
+
|
|
91
|
+
Create your documentation files in the `public/docs/` directory as Markdown files.
|
|
92
|
+
|
|
93
|
+
## Project Structure
|
|
94
|
+
|
|
95
|
+
After installation, your project structure should look like this:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
my-docs/
|
|
99
|
+
├── public/
|
|
100
|
+
│ ├── config/
|
|
101
|
+
│ │ └── site.yaml
|
|
102
|
+
│ └── docs/
|
|
103
|
+
│ └── guide/
|
|
104
|
+
│ └── introduction.md
|
|
105
|
+
├── src/
|
|
106
|
+
│ ├── App.vue
|
|
107
|
+
│ └── main.ts
|
|
108
|
+
├── index.html
|
|
109
|
+
├── package.json
|
|
110
|
+
└── vite.config.js
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Development
|
|
114
|
+
|
|
115
|
+
Start the development server:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm run dev
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Your site will be available at `http://localhost:5173` with hot reload enabled.
|
|
122
|
+
|
|
123
|
+
## Building for Production
|
|
124
|
+
|
|
125
|
+
Build your documentation for production:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npm run build
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The built files will be in the `dist/` directory, ready to deploy to any static hosting service.
|
|
132
|
+
|
|
133
|
+
## Next Steps
|
|
134
|
+
|
|
135
|
+
- [Quick Start Guide](/guide/quick-start) - Learn the basics
|
|
136
|
+
- [Configuration](/guide/configuration) - Customize your site
|
|
137
|
+
- [Examples](/examples) - See Vue Docs UI in action
|
|
138
|
+
|
|
139
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Introduction
|
|
2
|
+
|
|
3
|
+
Welcome to **Vue Docs UI** - the simplest way to create beautiful documentation websites with Vue.js!
|
|
4
|
+
|
|
5
|
+
## What is Vue Docs UI?
|
|
6
|
+
|
|
7
|
+
Vue Docs UI is a modern, lightweight, and highly customizable documentation framework built with Vue 3 and TypeScript. It helps you create professional documentation websites with minimal setup and maximum flexibility.
|
|
8
|
+
|
|
9
|
+
## Key Features
|
|
10
|
+
|
|
11
|
+
### 🚀 **Quick Setup**
|
|
12
|
+
Get started in minutes with zero configuration required.
|
|
13
|
+
|
|
14
|
+
### 📱 **Responsive Design**
|
|
15
|
+
Looks great on all devices - from mobile phones to desktop computers.
|
|
16
|
+
|
|
17
|
+
### 🎨 **Customizable Themes**
|
|
18
|
+
Built-in light and dark themes with full customization support.
|
|
19
|
+
|
|
20
|
+
### 📝 **Markdown Support**
|
|
21
|
+
Write your documentation in Markdown with enhanced features.
|
|
22
|
+
|
|
23
|
+
### 🔍 **Built-in Search**
|
|
24
|
+
Powerful search functionality to help users find content quickly.
|
|
25
|
+
|
|
26
|
+
### ⚡ **Lightning Fast**
|
|
27
|
+
Built with Vite for incredibly fast development and build times.
|
|
28
|
+
|
|
29
|
+
## Why Vue Docs UI?
|
|
30
|
+
|
|
31
|
+
- **Developer Friendly**: Simple API and intuitive configuration
|
|
32
|
+
- **Production Ready**: Optimized for performance and SEO
|
|
33
|
+
- **Extensible**: Easy to customize and extend with your own components
|
|
34
|
+
- **Modern**: Built with the latest Vue 3 and TypeScript technologies
|
|
35
|
+
|
|
36
|
+
## Getting Started
|
|
37
|
+
|
|
38
|
+
Ready to create your first documentation website? Check out our [Installation Guide](/guide/installation) to get started in just a few minutes!
|
|
39
|
+
|
|
40
|
+
## Community
|
|
41
|
+
|
|
42
|
+
Join our growing community:
|
|
43
|
+
|
|
44
|
+
- 🐛 [Report Issues](https://github.com/shenjianZ/vue-docs-ui/issues)
|
|
45
|
+
- 💡 [Feature Requests](https://github.com/shenjianZ/vue-docs-ui/discussions)
|
|
46
|
+
- 📖 [Documentation](https://github.com/shenjianZ/vue-docs-ui)
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
*Happy documenting! 📚*
|