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.
@@ -0,0 +1,217 @@
1
+ # Quick Start
2
+
3
+ This guide will help you understand the basics of Vue Docs UI and get your documentation website up and running quickly.
4
+
5
+ ## Project Overview
6
+
7
+ Vue Docs UI follows a simple file-based routing system. Your documentation is organized as:
8
+
9
+ - **Configuration**: `public/config/site.yaml` - Site settings and navigation
10
+ - **Content**: `public/docs/` - Markdown files for your documentation pages
11
+ - **Assets**: `public/images/` - Images and other static assets
12
+
13
+ ## Writing Your First Page
14
+
15
+ Let's create a simple documentation page:
16
+
17
+ ### 1. Create a Markdown File
18
+
19
+ Create a new file at `public/docs/my-first-page.md`:
20
+
21
+ ```markdown
22
+ # My First Page
23
+
24
+ Welcome to my documentation! This is written in **Markdown**.
25
+
26
+ ## Features
27
+
28
+ - Easy to write
29
+ - Supports code syntax highlighting
30
+ - Responsive design
31
+ - Built-in search
32
+
33
+ ## Code Example
34
+
35
+ ## Lists and More
36
+
37
+ 1. Ordered lists work great
38
+ 2. With automatic numbering
39
+ 3. And proper styling
40
+
41
+ - Unordered lists too
42
+ - With bullet points
43
+ - And consistent spacing
44
+ ```
45
+
46
+ > **Tip**: Use blockquotes for important notes and tips!
47
+
48
+
49
+ ### 2. Add to Navigation
50
+
51
+ Update your `public/config/site.yaml` to include the new page:
52
+
53
+ ```yaml
54
+ sidebar:
55
+ sections:
56
+ - title: "Getting Started"
57
+ path: "/guide"
58
+ children:
59
+ - title: "My First Page"
60
+ path: "/my-first-page"
61
+ ```
62
+
63
+ ### 3. View Your Page
64
+
65
+ Start the development server and navigate to your new page:
66
+
67
+ ```bash
68
+ npm run dev
69
+ ```
70
+
71
+ Visit `http://localhost:5173/my-first-page` to see your page!
72
+
73
+ ## Understanding Configuration
74
+
75
+ The `site.yaml` file controls your entire site structure:
76
+
77
+ ### Site Settings
78
+ ```yaml
79
+ site:
80
+ title: "Your Site Title"
81
+ description: "Site description for SEO"
82
+ logo: "📚" # Emoji, image URL, or path
83
+ author: "Your Name"
84
+ ```
85
+
86
+ ### Navigation Bar
87
+ ```yaml
88
+ navbar:
89
+ items:
90
+ - title: "Home"
91
+ link: "/"
92
+ - title: "GitHub"
93
+ link: "https://github.com/username/repo"
94
+ external: true
95
+ ```
96
+
97
+ ### Sidebar Navigation
98
+ ```yaml
99
+ sidebar:
100
+ sections:
101
+ - title: "Section Name"
102
+ path: "/section"
103
+ children:
104
+ - title: "Page Title"
105
+ path: "/page-path"
106
+ ```
107
+
108
+ ## Markdown Features
109
+
110
+ Vue Docs UI supports enhanced Markdown with:
111
+
112
+ ### Code Highlighting
113
+ ```javascript
114
+ // JavaScript code is highlighted
115
+ function greet(name) {
116
+ return `Hello, ${name}!`
117
+ }
118
+ ```
119
+
120
+ ### Tables
121
+ | Feature | Status | Description |
122
+ |---------|--------|-------------|
123
+ | Responsive | ✅ | Works on all devices |
124
+ | Themes | ✅ | Light and dark mode |
125
+ | Search | ✅ | Built-in search |
126
+
127
+ ### Math (Optional)
128
+ If you need math equations, you can add support for LaTeX:
129
+
130
+ Inline math: $E = mc^2$
131
+
132
+ Block math:
133
+ $$
134
+ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
135
+ $$
136
+
137
+ ## Customizing Appearance
138
+
139
+ ### Theme Colors
140
+ Customize your site's colors in `site.yaml`:
141
+
142
+ ```yaml
143
+ theme:
144
+ colors:
145
+ primary: "#3b82f6" # Main brand color
146
+ secondary: "#64748b" # Secondary text
147
+ accent: "#06b6d4" # Accent color
148
+ ```
149
+
150
+ ### Fonts
151
+ ```yaml
152
+ theme:
153
+ fonts:
154
+ primary: "Inter, -apple-system, BlinkMacSystemFont, sans-serif"
155
+ mono: "JetBrains Mono, Consolas, monospace"
156
+ ```
157
+
158
+ ## Adding Images
159
+
160
+ Place images in `public/images/` and reference them in your Markdown:
161
+
162
+ ```markdown
163
+ ![Logo](/images/logo.png)
164
+ ```
165
+
166
+ Or with custom sizing:
167
+ ```markdown
168
+ <img src="/images/screenshot.png" alt="Screenshot" width="600">
169
+ ```
170
+
171
+ ## Best Practices
172
+
173
+ ### 1. Organize Your Content
174
+ ```
175
+ public/docs/
176
+ ├── guide/
177
+ │ ├── introduction.md
178
+ │ ├── installation.md
179
+ │ └── quick-start.md
180
+ ├── api/
181
+ │ ├── components.md
182
+ │ └── utilities.md
183
+ └── examples/
184
+ ├── basic.md
185
+ └── advanced.md
186
+ ```
187
+
188
+ ### 2. Use Descriptive Titles
189
+ - Good: "Setting up Authentication"
190
+ - Bad: "Auth Setup"
191
+
192
+ ### 3. Add Table of Contents
193
+ Enable TOC in your `site.yaml`:
194
+
195
+ ```yaml
196
+ toc:
197
+ enabled: true
198
+ maxLevel: 3
199
+ title: "On This Page"
200
+ ```
201
+
202
+ ### 4. Link Between Pages
203
+ Use relative links to connect your content:
204
+
205
+ ```markdown
206
+ Check out our [Installation Guide](/guide/installation) for setup instructions.
207
+ ```
208
+
209
+ ## What's Next?
210
+
211
+ Now that you understand the basics:
212
+
213
+ 1. **[Configuration](/guide/configuration)** - Learn about all available options
214
+ 2. **[Advanced Features](/advanced/customization)** - Customize your site further
215
+ 3. **[Deployment](/advanced/deployment)** - Deploy your site to production
216
+
217
+ Happy documenting! 🚀
@@ -0,0 +1,31 @@
1
+ # Getting Started
2
+
3
+ ## Getting Started with Vue Docs UI
4
+
5
+ Welcome to Vue Docs UI! This is a modern documentation website building tool based on Vue 3.
6
+
7
+ ## Quick Overview
8
+
9
+ Vue Docs UI enables you to:
10
+ - 🚀 **Quick Start** - Create beautiful documentation websites with just a few lines of code
11
+ - 📱 **Responsive Design** - Perfect adaptation to all devices
12
+ - 🎨 **Highly Customizable** - Flexible theme and style configuration
13
+ - 📝 **Markdown Support** - Use familiar Markdown syntax
14
+
15
+ ## Learning Path
16
+
17
+ ### [📖 Introduction](/guide/introduction)
18
+ Learn about Vue Docs UI's core concepts and features
19
+
20
+ ### [⚡ Installation](/guide/installation)
21
+ Learn how to install and set up Vue Docs UI
22
+
23
+ ### [🏃‍♂️ Quick Start](/guide/quick-start)
24
+ Get hands-on experience through practical examples
25
+
26
+ ### [⚙️ Configuration](/guide/configuration)
27
+ Deep dive into configuration options and customization methods
28
+
29
+ ## Ready to Start?
30
+
31
+ Choose any of the topics above to begin your learning journey, or jump directly to [Quick Start](/guide/quick-start) to experience it immediately!
@@ -0,0 +1,58 @@
1
+ # Welcome to Vue Docs UI
2
+
3
+ Vue Docs UI is a modern documentation website builder based on Vue 3, providing an out-of-the-box documentation solution.
4
+
5
+ ## 🌟 Key Features
6
+
7
+ - **🚀 Ready to Use** - Launch your documentation website with just 3 lines of code
8
+ - **🎨 Modern Design** - Beautiful interface design with light/dark theme support
9
+ - **📱 Mobile Responsive** - Perfect responsive design
10
+ - **🌐 Internationalization** - Built-in multi-language support
11
+ - **🤖 AI Assistant** - Integrated AI chat assistant with multiple model support
12
+ - **⚡ High Performance** - Built with Vite for fast hot reload
13
+ - **🔍 Full-text Search** - Smart search functionality
14
+ - **📝 Enhanced Markdown** - Rich Markdown extensions
15
+
16
+ ## 🏗️ Architecture Features
17
+
18
+ - **Component-based Design** - Modular components, easy to extend
19
+ - **TypeScript Support** - Complete type support
20
+ - **Customizable Themes** - Flexible theme configuration
21
+ - **Plugin System** - Extensible plugin architecture
22
+
23
+ ## 📦 Quick Start
24
+
25
+ ```bash
26
+ # Create new project
27
+ npm create vue-docs-ui@latest my-docs
28
+
29
+ # Navigate to project directory
30
+ cd my-docs
31
+
32
+ # Install dependencies
33
+ npm install
34
+
35
+ # Start development server
36
+ npm run dev
37
+ ```
38
+
39
+ ## 📖 Usage
40
+
41
+ ```javascript
42
+ import { createDocsApp } from 'vue-docs-ui'
43
+ import 'vue-docs-ui/dist/vue-docs-ui.css'
44
+
45
+ createDocsApp({
46
+ configPath: '/config/site.yaml',
47
+ el: '#app'
48
+ })
49
+ ```
50
+
51
+ It's that simple! No complex configuration needed, get a fully functional documentation website immediately.
52
+
53
+ ## 🔗 Related Links
54
+
55
+ - [GitHub Repository](https://github.com/shenjianZ/vue-docs-ui)
56
+ - [Online Demo](https://vue-docs-ui.example.com)
57
+ - [User Guide](/guide/introduction)
58
+ - [API Documentation](/advanced/api)
@@ -0,0 +1,169 @@
1
+ # 配置文件 (`site.yaml`) 详解
2
+
3
+ `vue-docs-ui` 的核心是其**配置驱动**的理念。你几乎可以通过 `public/config/site.yaml` 这一个文件来定义整个网站的外观和行为。本文档将详细解释每个配置项。
4
+
5
+ ## 顶级配置项概览
6
+
7
+ | 顶级字段 | 说明 |
8
+ | :--- | :--- |
9
+ | `site` | 网站的全局信息,如标题、描述、Logo。 |
10
+ | `navbar` | 配置网站顶部的导航栏。 |
11
+ | `sidebar` | 配置网站侧边栏的导航菜单。 |
12
+ | `theme` | 配置网站的主题,如颜色、浅色/深色模式。 |
13
+ | `footer` | 配置网站底部的页脚信息。 |
14
+ | `toc` | 配置文章页面右侧的目录(Table of Contents)。 |
15
+ | `search` | 配置内置的全文搜索功能。 |
16
+ | `pwa` | 配置渐进式Web应用(PWA)相关设置。 |
17
+ | `ai` | 配置 AI 助手功能。 |
18
+
19
+ ---
20
+
21
+ ## `site`
22
+
23
+ 网站的基础元数据配置。
24
+
25
+ | 字段 | 说明 | 示例 |
26
+ | :--- | :--- | :--- |
27
+ | `title` | 网站标题,显示在浏览器标签页上。 | `"Vue Docs UI"` |
28
+ | `description` | 网站描述,用于搜索引擎优化 (SEO)。 | `"一个 Vue 3 文档网站构建工具"` |
29
+ | `logo` | 网站 Logo,显示在导航栏左上角。 | `"📚"` 或 `"/images/logo.png"` |
30
+ | `author` | 网站作者。 | `"Vue Docs UI Team"` |
31
+
32
+ **Logo 格式说明:**
33
+ 1. **Emoji**: 直接使用一个表情符号,如 `"🚀"`。
34
+ 2. **本地图片**: 指向 `public` 目录下的图片路径,如 `"/images/logo.png"`。
35
+ 3. **外部图片 URL**: 一个完整的图片链接。
36
+
37
+ ---
38
+
39
+ ## `navbar`
40
+
41
+ 顶部导航栏配置。
42
+
43
+ | 字段 | 说明 |
44
+ | :--- | :--- |
45
+ | `items` | 导航项数组,定义了导航栏中显示的所有链接。 |
46
+
47
+ ### `navbar.items`
48
+
49
+ | 字段 | 说明 | 示例 |
50
+ | :--- | :--- | :--- |
51
+ | `title` | 导航项的显示文本。 | `"指南"` |
52
+ | `link` | 链接地址。内部链接以 `/` 开头。 | `"/guide/introduction"` |
53
+ | `external` | (可选) `true` 表示为外部链接,将在新标签页打开。 | `true` |
54
+
55
+ ---
56
+
57
+ ## `sidebar`
58
+
59
+ 侧边栏导航配置,是文档结构的核心。
60
+
61
+ | 字段 | 说明 |
62
+ | :--- | :--- |
63
+ | `sections` | 侧边栏区域数组,每个区域代表一个可折叠的菜单组。 |
64
+
65
+ ### `sidebar.sections`
66
+
67
+ | 字段 | 说明 | 示例 |
68
+ | :--- | :--- | :--- |
69
+ | `title` | 区域的标题。 | `"入门指南"` |
70
+ | `path` | 区域的基础路径。当用户访问的 URL 以此路径开头时,该区域会自动展开并高亮。 | `"/guide"` |
71
+ | `children` | 该区域下的子链接数组。 | |
72
+
73
+ ### `sidebar.sections.children`
74
+
75
+ | 字段 | 说明 | 示例 |
76
+ | :--- | :--- | :--- |
77
+ | `title` | 子链接的显示文本。 | `"介绍"` |
78
+ | `path` | 子链接的完整路径,指向一个具体的 Markdown 页面。 | `"/guide/introduction"` |
79
+
80
+ ---
81
+
82
+ ## `theme`
83
+
84
+ 主题和外观配置。
85
+
86
+ | 字段 | 说明 | 可选值 | 默认值 |
87
+ | :--- | :--- | :--- | :--- |
88
+ | `defaultMode` | 网站的默认主题模式。 | `'light'`, `'dark'`, `'auto'` | `'auto'` |
89
+ | `allowToggle` | 是否允许用户切换主题。 | `true`, `false` | `true` |
90
+ | `primaryColor`| 网站的主题色。 | CSS 颜色值 | `"#3b82f6"` |
91
+
92
+ ---
93
+
94
+ ## `footer`
95
+
96
+ 页脚配置。
97
+
98
+ | 字段 | 说明 | 示例 |
99
+ | :--- | :--- | :--- |
100
+ | `copyright` | 版权信息。`{year}` 会被替换为当前年份。 | `"Copyright © {year} My Company"` |
101
+ | `repository` | (可选) 仓库信息,用于显示“在 GitHub 上编辑此页”等链接。 | |
102
+ | `links` | (可选) 在页脚显示的额外链接列。 | |
103
+ | `social` | (可选) 在页脚显示的社交媒体图标链接。 | |
104
+
105
+ ### `footer.repository`
106
+
107
+ | 字段 | 说明 | 示例 |
108
+ | :--- | :--- | :--- |
109
+ | `url` | 仓库的 URL。 | `"https://github.com/user/repo"` |
110
+ | `branch` | 文档所在的 Git 分支。 | `"main"` |
111
+ | `dir` | 文档文件在仓库中的根目录。 | `"docs/src"` |
112
+
113
+ ### `footer.social`
114
+
115
+ | 字段 | 说明 | 示例 |
116
+ | :--- | :--- | :--- |
117
+ | `name` | 社交媒体名称,用于 `aria-label`。 | `"GitHub"` |
118
+ | `url` | 链接地址。 | `"https://github.com/user"` |
119
+ | `icon` | 图标标识符,支持 `github`, `twitter`, `discord` 等。 | `"github"` |
120
+
121
+ ---
122
+
123
+ ## `toc` (Table of Contents)
124
+
125
+ 文章页面右侧的目录配置。
126
+
127
+ | 字段 | 说明 | 示例 |
128
+ | :--- | :--- | :--- |
129
+ | `enabled` | 是否启用页面目录功能。 | `true` |
130
+ | `maxLevel` | 在目录中显示的最大标题级别(h1-h6)。 | `3` |
131
+ | `title` | 目录组件的标题。 | `"本页内容"` |
132
+
133
+ ---
134
+
135
+ ## `search`
136
+
137
+ 内置搜索功能配置。
138
+
139
+ | 字段 | 说明 | 示例 |
140
+ | :--- | :--- | :--- |
141
+ | `enabled` | 是否启用搜索功能。 | `true` |
142
+ | `placeholder` | 搜索框的占位文本。 | `"搜索文档..."` |
143
+
144
+ ---
145
+
146
+ ## `pwa`
147
+
148
+ 渐进式Web应用配置。
149
+
150
+ | 字段 | 说明 | 示例 |
151
+ | :--- | :--- | :--- |
152
+ | `enabled` | 是否启用 PWA 功能。 | `true` |
153
+ | `name` | PWA 的完整名称。 | `"Vue Docs UI"` |
154
+ | `shortName` | PWA 的短名称。 | `"VueDocs"` |
155
+
156
+ ---
157
+
158
+ ## `ai`
159
+
160
+ AI 助手配置。
161
+
162
+ | 字段 | 说明 | 示例 |
163
+ | :--- | :--- | :--- |
164
+ | `enabled` | 是否启用 AI 助手功能。 | `true` |
165
+ | `buttonTitle` | 浮动按钮的标题。 | `"AI 助手"` |
166
+ | `modalTitle` | 对话框的标题。 | `"与 AI 对话"` |
167
+ | `placeholder` | 输入框的占位文本。 | `"向我提问..."` |
168
+
169
+ **注意**: AI 功能的 `provider` 和 `apiKey` 等敏感信息在 `public/config/ai.json` 中单独配置,以避免意外泄露。
@@ -0,0 +1,66 @@
1
+ # 安装
2
+
3
+ ## 环境要求
4
+
5
+ 在开始之前,请确保你的开发环境满足以下要求:
6
+
7
+ - **Node.js**: 版本 `>= 18.0.0`
8
+ - **包管理器**: `npm`、`yarn` 或 `pnpm`
9
+
10
+ ## 推荐方式:使用脚手架
11
+
12
+ 我们强烈推荐使用官方的 `create-vue-docs-ui` 脚手架来创建你的新文档项目。这是最快、最简单的方式,可以确保所有配置都已就绪。
13
+
14
+ 1. **运行创建命令**:
15
+ ```bash
16
+ npm create vue-docs-ui@latest my-docs
17
+ ```
18
+ 这会在当前目录下创建一个名为 `my-docs` 的新文件夹。
19
+
20
+ 2. **进入项目并安装依赖**:
21
+ ```bash
22
+ cd my-docs
23
+ npm install
24
+ ```
25
+
26
+ 3. **启动开发服务器**:
27
+ ```bash
28
+ npm run dev
29
+ ```
30
+ 现在,你的文档网站已经运行在 `http://localhost:5173` 上了。
31
+
32
+ ## 手动安装 (适用于现有项目)
33
+
34
+ 如果你想在已有的 Vite + Vue 3 项目中手动集成 `vue-docs-ui`,可以按照以下步骤操作:
35
+
36
+ 1. **安装核心库**:
37
+ ```bash
38
+ npm install vue-docs-ui
39
+ ```
40
+
41
+ 2. **创建配置文件**:
42
+ 在你的 `public` 目录下创建一个 `config` 文件夹,并在其中新建一个 `site.yaml` 文件。你可以从[这里](https://github.com/shenjianZ/vue-docs-ui/blob/main/vue-docs-ui/public/config/site.yaml)复制一个基础模板。
43
+
44
+ 3. **创建文档目录**:
45
+ 在 `public` 目录下创建一个 `docs` 文件夹,用于存放你的 Markdown 文件。
46
+
47
+ 4. **修改应用入口文件**:
48
+ 更新你的 `src/main.ts` (或 `main.js`) 文件,使用 `createDocsApp` 来初始化应用。
49
+
50
+ ```typescript
51
+ // src/main.ts
52
+ import { createApp } from 'vue'
53
+ import { createDocsApp } from 'vue-docs-ui'
54
+ import 'vue-docs-ui/dist/style.css' // 引入核心样式
55
+
56
+ // 移除原有的 createApp(App).mount('#app')
57
+
58
+ createDocsApp({
59
+ // el 是挂载点,必须与 index.html 中的 id 一致
60
+ el: '#app',
61
+ // configPath 指向你的主配置文件
62
+ configPath: '/config/site.yaml',
63
+ // aiConfigPath 是可选的 AI 助手配置
64
+ aiConfigPath: '/config/ai.json'
65
+ })
66
+ ```
@@ -0,0 +1,29 @@
1
+ # 介绍
2
+
3
+ Vue Docs UI 是一个专为构建现代化文档网站而设计的 Vue 3 组件库与工具集。它的核心哲学是**配置优于编码**,让你能将精力完全集中在内容创作上。
4
+
5
+ ## 核心优势
6
+
7
+ - **配置驱动**: 这是 Vue Docs UI 最核心的特性。你不需要编写 Vue 组件或复杂的路由逻辑,只需维护一个清晰的 `site.yaml` 文件,就能定义网站的导航、侧边栏、主题、页脚等所有内容。
8
+
9
+ - **功能完备**: 开箱即用,提供了现代文档网站所需的一切:
10
+ - 响应式布局
11
+ - 明暗主题切换
12
+ - 基于 Markdown 的内容渲染
13
+ - 代码语法高亮
14
+ - 内置全文搜索
15
+ - PWA (渐进式Web应用) 支持
16
+ - 可选的 AI 问答助手
17
+
18
+ - **极简上手**: 通过官方的 `create-vue-docs-ui` 脚手架,你可以在一分钟内启动一个功能齐全的文档网站,无需任何复杂的环境配置。
19
+
20
+ - **高度可定制**: 虽然开箱即用,但每个部分(如 Logo、配色、导航链接、社交媒体图标等)都可以通过配置文件进行深度定制。
21
+
22
+ ## 适用场景
23
+
24
+ 无论你是个人开发者还是团队,Vue Docs UI 都非常适合以下场景:
25
+
26
+ - **开源项目文档**: 为你的项目提供一个专业、易于维护的文档网站。
27
+ - **产品手册**: 清晰地展示你的产品功能和使用指南。
28
+ - **团队知识库**: 在团队内部沉淀和分享知识。
29
+ - **个人博客或作品集**: 以优雅的方式组织和展示你的技术文章或项目。
@@ -0,0 +1,100 @@
1
+ # 快速上手
2
+
3
+ 本指南将引导你在 5 分钟内,从零开始创建、配置并运行一个属于你自己的文档网站。
4
+
5
+ ## 1. 创建项目
6
+
7
+ 使用官方脚手架是最高效的方式。打开你的终端,运行以下命令:
8
+
9
+ ```bash
10
+ # 这会创建一个名为 "my-awesome-docs" 的项目
11
+ npm create vue-docs-ui@latest my-awesome-docs
12
+ ```
13
+
14
+ 然后,进入项目目录并安装依赖:
15
+
16
+ ```bash
17
+ cd my-awesome-docs
18
+ npm install
19
+ ```
20
+
21
+ ## 2. 组织你的文档
22
+
23
+ 所有的文档内容都以 Markdown 文件的形式存放在 `public/docs/` 目录下。
24
+
25
+ - 打开 `public/docs/zh-cn/` 目录。
26
+ - 你可以修改现有的 `index.md` 和 `guide` 目录下的文件,或者创建新的 `.md` 文件。
27
+
28
+ 例如,我们来创建一个新页面。在 `public/docs/zh-cn/` 下新建一个 `about.md` 文件:
29
+
30
+ ```markdown
31
+ # 关于我们
32
+
33
+ 这是一个关于我们团队的页面。
34
+ 我们热爱开源和创造!
35
+ ```
36
+
37
+ ## 3. 配置网站
38
+
39
+ 现在,让我们通过修改配置文件来展示新创建的页面。
40
+
41
+ 打开核心配置文件 `public/config/site.yaml`。
42
+
43
+ ### a. 修改网站信息
44
+
45
+ 更新 `site` 部分,给你的网站一个新标题和 Logo。
46
+
47
+ ```yaml
48
+ site:
49
+ title: "我的超赞文档"
50
+ description: "一个使用 Vue Docs UI 构建的网站"
51
+ logo: "🚀" # 你可以使用 emoji 或图片路径
52
+ ```
53
+
54
+ ### b. 添加到导航栏
55
+
56
+ 在 `navbar.items` 数组中,为“关于”页面添加一个链接。
57
+
58
+ ```yaml
59
+ navbar:
60
+ items:
61
+ - title: "首页"
62
+ link: "/zh-cn/"
63
+ - title: "指南"
64
+ link: "/zh-cn/guide/introduction"
65
+ - title: "关于" # 新增
66
+ link: "/zh-cn/about" # 新增
67
+ ```
68
+
69
+ ### c. 添加到侧边栏
70
+
71
+ 为了让“关于”页面在侧边栏也可见,我们在 `sidebar.sections` 中添加一个新区域。
72
+
73
+ ```yaml
74
+ sidebar:
75
+ sections:
76
+ - title: "入门指南"
77
+ path: "/zh-cn/guide"
78
+ children:
79
+ - title: "介绍"
80
+ path: "/zh-cn/guide/introduction"
81
+ - title: "安装"
82
+ path: "/zh-cn/guide/installation"
83
+ - title: "快速上手"
84
+ path: "/zh-cn/guide/quick-start"
85
+ - title: "关于我们" # 新增区域
86
+ path: "/zh-cn/about" # 新增区域
87
+ children: # 新增区域
88
+ - title: "关于" # 新增区域
89
+ path: "/zh-cn/about" # 新增区域
90
+ ```
91
+
92
+ ## 4. 启动网站
93
+
94
+ 保存你的所有修改,然后在终端运行:
95
+
96
+ ```bash
97
+ npm run dev
98
+ ```
99
+
100
+ 你的网站现在应该运行在 `http://localhost:5173` 上了。访问它,你会看到更新后的标题、Logo,以及导航栏和侧边栏中新增的“关于”链接。恭喜你,你已经成功掌握了 Vue Docs UI 的基本工作流程!
@@ -0,0 +1,10 @@
1
+ # 指南
2
+
3
+ 本指南将帮助你全面了解并掌握 Vue Docs UI 的各项功能。无论你是初学者还是希望进行深度定制,都能在这里找到所需的信息。
4
+
5
+ ## 目录
6
+
7
+ - **[介绍](/guide/introduction)**: 了解 Vue Docs UI 的核心理念和主要优势。
8
+ - **[安装](/guide/installation)**: 学习如何通过脚手架或手动方式安装。
9
+ - **[快速上手](/guide/quick-start)**: 在 5 分钟内创建并运行你的第一个文档网站。
10
+ - **[配置说明 (`site.yaml`)](/guide/configuration)**: 深入了解每个配置项,完全掌控你的网站。