@jet-w/astro-blog 0.2.0 → 0.2.1
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/{chunk-HVQKQN6B.js → chunk-6D3XRDNY.js} +1 -1
- package/dist/{chunk-ATRISB7B.js → chunk-A2E2VSAQ.js} +43 -3
- package/dist/{chunk-AZHCNNAC.js → chunk-TJTPX2WP.js} +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +2 -2
- package/dist/{i18n-5H4W145i.d.ts → i18n-PgMCFBw0.d.ts} +20 -0
- package/dist/index.d.ts +21 -3
- package/dist/index.js +20 -3
- package/dist/integration.d.ts +1 -1
- package/dist/integration.js +2 -2
- package/package.json +1 -1
- package/src/components/blog/FloatingToc.vue +11 -3
- package/src/components/blog/Hero.astro +17 -2
- package/src/components/blog/NavigationTabs.vue +46 -15
- package/src/components/blog/PostCard.astro +28 -10
- package/src/components/blog/RelatedPosts.astro +23 -7
- package/src/components/blog/TableOfContents.astro +10 -4
- package/src/components/blog/TagCloud.astro +4 -3
- package/src/components/home/FeaturedPostsSection.astro +22 -6
- package/src/components/home/QuickNavSection.astro +33 -4
- package/src/components/home/RecentPostsSection.astro +22 -6
- package/src/components/home/StatsSection.astro +24 -6
- package/src/components/layout/Header.astro +9 -5
- package/src/components/layout/Sidebar.astro +14 -11
- package/src/components/ui/SearchBox.vue +13 -5
- package/src/components/ui/SearchInterface.vue +49 -25
- package/src/pages/archives/[year]/[month].astro +36 -17
- package/src/pages/archives/index.astro +36 -20
- package/src/pages/categories/[category].astro +33 -16
- package/src/pages/categories/index.astro +37 -14
- package/src/pages/posts/[...slug].astro +125 -18
- package/src/pages/posts/index.astro +59 -37
- package/src/pages/posts/page/[page].astro +65 -27
- package/src/pages/search.astro +50 -14
- package/src/pages/slides/index.astro +25 -6
- package/src/pages/tags/[tag].astro +32 -15
- package/src/pages/tags/index.astro +39 -16
- package/src/plugins/remark-containers.mjs +351 -322
- package/src/plugins/remark-protect-code.mjs +69 -0
- package/src/styles/global.css +35 -1
- package/templates/default/.claude/ralph-loop.local.md +48 -0
- package/templates/default/astro.config.mjs +13 -4
- package/templates/default/content/posts/blog_docs_en/{get-started → 01.get-started}/01-intro.md +1 -1
- package/templates/default/content/posts/blog_docs_en/{get-started → 01.get-started}/02-install.md +1 -1
- package/templates/default/content/posts/blog_docs_en/{get-started → 01.get-started}/03-create-post.md +1 -1
- package/templates/default/content/posts/blog_docs_en/{get-started → 01.get-started}/04-structure.md +1 -1
- package/templates/default/content/posts/blog_docs_en/01.get-started/05-deploy.md +208 -0
- package/templates/default/content/posts/blog_docs_en/{get-started → 01.get-started}/README.md +1 -1
- package/templates/default/content/posts/blog_docs_en/02.guide/02-containers.md +245 -0
- package/templates/default/content/posts/blog_docs_en/{guide/markdown → 02.guide}/03-code-blocks.md +2 -1
- package/templates/default/content/posts/blog_docs_en/{guide/features/01-mermaid.md → 02.guide/03-mermaid.md} +1 -1
- package/templates/default/content/posts/blog_docs_en/{guide/features → 02.guide}/04-icons.md +4 -2
- package/templates/default/content/posts/blog_docs_en/{guide/features/02-latex.md → 02.guide/06-latex.md} +1 -1
- package/templates/default/content/posts/blog_docs_en/{guide/features/03-video.md → 02.guide/07-video.md} +1 -1
- package/templates/default/content/posts/blog_docs_en/02.guide/08-slides.md +359 -0
- package/templates/default/content/posts/blog_docs_en/{guide/markdown → 02.guide}/README.md +22 -3
- package/templates/default/content/posts/blog_docs_en/{config → 03.config}/01-site.md +1 -1
- package/templates/default/content/posts/blog_docs_en/{config → 03.config}/02-sidebar.md +1 -1
- package/templates/default/content/posts/blog_docs_en/{config → 03.config}/03-i18n.md +88 -24
- package/templates/default/content/posts/blog_docs_en/{config → 03.config}/README.md +1 -1
- package/templates/default/content/posts/blog_docs_en/README.md +2 -1
- package/templates/default/content/posts/blog_docs_zh/01.get-started/01-intro.md +81 -0
- package/templates/default/content/posts/blog_docs_zh/01.get-started/02-install.md +137 -0
- package/templates/default/content/posts/blog_docs_zh/01.get-started/03-create-post.md +176 -0
- package/templates/default/content/posts/blog_docs_zh/01.get-started/04-structure.md +173 -0
- package/templates/default/content/posts/blog_docs_zh/01.get-started/05-deploy.md +208 -0
- package/templates/default/content/posts/blog_docs_zh/01.get-started/README.md +52 -0
- package/templates/default/content/posts/blog_docs_zh/02.guide/02-containers.md +245 -0
- package/templates/default/content/posts/blog_docs_zh/02.guide/03-code-blocks.md +206 -0
- package/templates/default/content/posts/blog_docs_zh/02.guide/03-mermaid.md +194 -0
- package/templates/default/content/posts/blog_docs_zh/02.guide/04-icons.md +229 -0
- package/templates/default/content/posts/blog_docs_zh/02.guide/06-latex.md +233 -0
- package/templates/default/content/posts/blog_docs_zh/02.guide/07-video.md +184 -0
- package/templates/default/content/posts/blog_docs_zh/02.guide/08-slides.md +359 -0
- package/templates/default/content/posts/blog_docs_zh/02.guide/README.md +213 -0
- package/templates/default/content/posts/blog_docs_zh/03.config/01-site.md +208 -0
- package/templates/default/content/posts/blog_docs_zh/03.config/02-sidebar.md +240 -0
- package/templates/default/content/posts/blog_docs_zh/03.config/03-i18n.md +348 -0
- package/templates/default/content/posts/blog_docs_zh/03.config/README.md +85 -0
- package/templates/default/content/posts/blog_docs_zh/README.md +78 -0
- package/templates/default/src/config/locales/en/index.ts +5 -1
- package/templates/default/src/config/locales/en/menu.ts +3 -1
- package/templates/default/src/config/locales/en/sidebar.ts +18 -2
- package/templates/default/src/config/locales/en/site.ts +1 -1
- package/templates/default/src/config/locales/en/ui.ts +29 -0
- package/templates/default/src/config/locales/zh-CN/index.ts +5 -1
- package/templates/default/src/config/locales/zh-CN/menu.ts +7 -5
- package/templates/default/src/config/locales/zh-CN/sidebar.ts +22 -6
- package/templates/default/src/config/locales/zh-CN/site.ts +2 -2
- package/templates/default/src/config/locales/zh-CN/ui.ts +29 -0
- package/templates/default/src/config/site.ts +2 -2
- package/templates/default/src/content.config.ts +15 -3
- package/templates/default/content/posts/blog_docs/01-quick-start.md +0 -162
- package/templates/default/content/posts/blog_docs/02-frontmatter.md +0 -277
- package/templates/default/content/posts/blog_docs/03-markdown-basic.md +0 -350
- package/templates/default/content/posts/blog_docs/04-containers.md +0 -331
- package/templates/default/content/posts/blog_docs/05-code-blocks.md +0 -388
- package/templates/default/content/posts/blog_docs/06-mermaid.md +0 -431
- package/templates/default/content/posts/blog_docs/07-video.md +0 -243
- package/templates/default/content/posts/blog_docs/08-latex.md +0 -382
- package/templates/default/content/posts/blog_docs/09-icons.md +0 -326
- package/templates/default/content/posts/blog_docs/10-sidebar.md +0 -445
- package/templates/default/content/posts/blog_docs/11-config.md +0 -334
- package/templates/default/content/posts/blog_docs/12-i18n.md +0 -355
- package/templates/default/content/posts/blog_docs/12-slides.mdx +0 -552
- package/templates/default/content/posts/blog_docs/README.md +0 -152
- package/templates/default/content/posts/blog_docs_en/get-started/05-deploy.md +0 -197
- package/templates/default/content/posts/blog_docs_en/guide/README.md +0 -59
- package/templates/default/content/posts/blog_docs_en/guide/features/README.md +0 -51
- package/templates/default/content/posts/blog_docs_en/guide/markdown/02-containers.md +0 -226
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 侧边栏配置
|
|
3
|
-
description: 灵活配置博客导航菜单,支持自动扫描和手动配置
|
|
4
|
-
pubDate: 2025-12-11
|
|
5
|
-
author: Astro Blog
|
|
6
|
-
categories:
|
|
7
|
-
- 博客教程
|
|
8
|
-
tags:
|
|
9
|
-
- 配置
|
|
10
|
-
- 侧边栏
|
|
11
|
-
- 导航
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# 侧边栏配置
|
|
15
|
-
|
|
16
|
-
本博客提供灵活的侧边栏配置系统,支持三种配置模式:自动扫描、手动配置和混合模式。
|
|
17
|
-
|
|
18
|
-
## 配置文件位置
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
src/config/sidebar.ts
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## 配置结构
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
export const sidebarConfig: SidebarConfig = {
|
|
28
|
-
enabled: true, // 是否启用侧边栏
|
|
29
|
-
showRecentPosts: true, // 显示最新文章
|
|
30
|
-
recentPostsCount: 5, // 最新文章数量
|
|
31
|
-
showPopularTags: true, // 显示热门标签
|
|
32
|
-
popularTagsCount: 8, // 热门标签数量
|
|
33
|
-
showArchives: true, // 显示文章归档
|
|
34
|
-
archivesCount: 6, // 归档条目数量
|
|
35
|
-
showFriendLinks: true, // 显示友情链接
|
|
36
|
-
friendLinks: [...], // 友情链接列表
|
|
37
|
-
groups: [...] // 侧边栏分组配置
|
|
38
|
-
};
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## 三种配置模式
|
|
42
|
-
|
|
43
|
-
### 1. 扫描模式 (scan)
|
|
44
|
-
|
|
45
|
-
自动扫描指定文件夹,根据文件结构生成导航树。
|
|
46
|
-
|
|
47
|
-
```typescript
|
|
48
|
-
{
|
|
49
|
-
type: 'scan',
|
|
50
|
-
title: '技术文档', // 分组标题
|
|
51
|
-
icon: 'ri:folder-3-line', // 分组图标
|
|
52
|
-
scanPath: 'tech', // 扫描路径(相对于 content/posts)
|
|
53
|
-
collapsed: false, // 默认是否折叠
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
#### 完整配置选项
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
{
|
|
61
|
-
type: 'scan',
|
|
62
|
-
title: '技术文档',
|
|
63
|
-
icon: 'ri:folder-3-line',
|
|
64
|
-
scanPath: 'tech/tools', // 可以是子目录
|
|
65
|
-
collapsed: false, // 默认展开
|
|
66
|
-
maxDepth: 3, // 最大扫描深度
|
|
67
|
-
exclude: ['drafts', 'archive'], // 排除的文件夹/文件
|
|
68
|
-
include: ['*.md'], // 只包含的文件
|
|
69
|
-
sortBy: 'name', // 排序方式: 'name' | 'date' | 'title'
|
|
70
|
-
sortOrder: 'asc', // 排序顺序: 'asc' | 'desc'
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
#### 示例:扫描多个目录
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
groups: [
|
|
78
|
-
{
|
|
79
|
-
type: 'scan',
|
|
80
|
-
title: '前端开发',
|
|
81
|
-
icon: 'ri:code-line',
|
|
82
|
-
scanPath: 'tech/frontend',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
type: 'scan',
|
|
86
|
-
title: '后端开发',
|
|
87
|
-
icon: 'ri:server-line',
|
|
88
|
-
scanPath: 'tech/backend',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
type: 'scan',
|
|
92
|
-
title: 'DevOps',
|
|
93
|
-
icon: 'ri:cloud-line',
|
|
94
|
-
scanPath: 'tech/devops',
|
|
95
|
-
},
|
|
96
|
-
]
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
::: tip 文件夹标题
|
|
100
|
-
在文件夹中添加 `README.md`,其 `title` 字段会显示为文件夹名称。
|
|
101
|
-
:::
|
|
102
|
-
|
|
103
|
-
### 2. 手动模式 (manual)
|
|
104
|
-
|
|
105
|
-
完全手动配置导航项,适合需要精确控制顺序和内容的场景。
|
|
106
|
-
|
|
107
|
-
```typescript
|
|
108
|
-
{
|
|
109
|
-
type: 'manual',
|
|
110
|
-
title: '快速导航',
|
|
111
|
-
icon: 'ri:star-line',
|
|
112
|
-
items: [
|
|
113
|
-
{
|
|
114
|
-
title: '入门指南',
|
|
115
|
-
slug: 'getting-started', // 文章路径
|
|
116
|
-
icon: 'ri:rocket-line',
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
title: 'API 文档',
|
|
120
|
-
slug: 'api-reference',
|
|
121
|
-
badge: 'NEW', // 徽章文字
|
|
122
|
-
badgeType: 'success', // 徽章类型
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
title: '外部链接',
|
|
126
|
-
link: 'https://example.com', // 外部链接
|
|
127
|
-
icon: 'ri:external-link-line',
|
|
128
|
-
},
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
#### 嵌套结构
|
|
134
|
-
|
|
135
|
-
```typescript
|
|
136
|
-
{
|
|
137
|
-
type: 'manual',
|
|
138
|
-
title: '教程系列',
|
|
139
|
-
items: [
|
|
140
|
-
{
|
|
141
|
-
title: 'Vue 教程',
|
|
142
|
-
icon: 'ri:vuejs-line',
|
|
143
|
-
children: [ // 子项
|
|
144
|
-
{ title: '基础入门', slug: 'vue/basics' },
|
|
145
|
-
{ title: '组件开发', slug: 'vue/components' },
|
|
146
|
-
{ title: '状态管理', slug: 'vue/state' },
|
|
147
|
-
]
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
title: 'React 教程',
|
|
151
|
-
icon: 'ri:reactjs-line',
|
|
152
|
-
children: [
|
|
153
|
-
{ title: '快速开始', slug: 'react/quickstart' },
|
|
154
|
-
{ title: 'Hooks 详解', slug: 'react/hooks' },
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
#### 徽章类型
|
|
162
|
-
|
|
163
|
-
| 类型 | 颜色 | 用途 |
|
|
164
|
-
|:---|:---|:---|
|
|
165
|
-
| `info` | 蓝色 | 一般信息 |
|
|
166
|
-
| `success` | 绿色 | 新内容、推荐 |
|
|
167
|
-
| `warning` | 黄色 | 注意、测试中 |
|
|
168
|
-
| `error` | 红色 | 热门、重要 |
|
|
169
|
-
|
|
170
|
-
```typescript
|
|
171
|
-
items: [
|
|
172
|
-
{ title: '新功能', slug: 'new-feature', badge: 'NEW', badgeType: 'success' },
|
|
173
|
-
{ title: '热门文章', slug: 'popular', badge: 'HOT', badgeType: 'error' },
|
|
174
|
-
{ title: '测试版', slug: 'beta', badge: 'BETA', badgeType: 'warning' },
|
|
175
|
-
]
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### 3. 混合模式 (mixed)
|
|
179
|
-
|
|
180
|
-
结合扫描和手动配置,灵活组合。
|
|
181
|
-
|
|
182
|
-
```typescript
|
|
183
|
-
{
|
|
184
|
-
type: 'mixed',
|
|
185
|
-
title: '学习资源',
|
|
186
|
-
icon: 'ri:book-line',
|
|
187
|
-
sections: [
|
|
188
|
-
{
|
|
189
|
-
type: 'manual',
|
|
190
|
-
title: '推荐阅读',
|
|
191
|
-
items: [
|
|
192
|
-
{ title: '必读文章', slug: 'must-read', badge: 'HOT', badgeType: 'error' },
|
|
193
|
-
{ title: '常见问题', slug: 'faq' },
|
|
194
|
-
]
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
type: 'scan',
|
|
198
|
-
title: '教程系列',
|
|
199
|
-
scanPath: 'tutorials',
|
|
200
|
-
}
|
|
201
|
-
]
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### 4. 分隔符 (divider)
|
|
206
|
-
|
|
207
|
-
在分组之间添加视觉分隔:
|
|
208
|
-
|
|
209
|
-
```typescript
|
|
210
|
-
groups: [
|
|
211
|
-
{
|
|
212
|
-
type: 'scan',
|
|
213
|
-
title: '技术文档',
|
|
214
|
-
scanPath: 'tech',
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
type: 'divider',
|
|
218
|
-
title: '其他内容', // 可选的分隔符标题
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
type: 'manual',
|
|
222
|
-
title: '关于',
|
|
223
|
-
items: [...]
|
|
224
|
-
},
|
|
225
|
-
]
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## 完整配置示例
|
|
229
|
-
|
|
230
|
-
```typescript
|
|
231
|
-
// src/config/sidebar.ts
|
|
232
|
-
import type { SidebarConfig } from './sidebar';
|
|
233
|
-
|
|
234
|
-
export const sidebarConfig: SidebarConfig = {
|
|
235
|
-
enabled: true,
|
|
236
|
-
|
|
237
|
-
// 最新文章
|
|
238
|
-
showRecentPosts: true,
|
|
239
|
-
recentPostsCount: 5,
|
|
240
|
-
|
|
241
|
-
// 热门标签
|
|
242
|
-
showPopularTags: true,
|
|
243
|
-
popularTagsCount: 8,
|
|
244
|
-
|
|
245
|
-
// 归档
|
|
246
|
-
showArchives: true,
|
|
247
|
-
archivesCount: 6,
|
|
248
|
-
|
|
249
|
-
// 友情链接
|
|
250
|
-
showFriendLinks: true,
|
|
251
|
-
friendLinks: [
|
|
252
|
-
{
|
|
253
|
-
title: 'Astro 官网',
|
|
254
|
-
url: 'https://astro.build',
|
|
255
|
-
icon: 'ri:rocket-line',
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
title: 'Tailwind CSS',
|
|
259
|
-
url: 'https://tailwindcss.com',
|
|
260
|
-
icon: 'ri:palette-line',
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
title: 'Vue.js',
|
|
264
|
-
url: 'https://vuejs.org',
|
|
265
|
-
icon: 'ri:vuejs-line',
|
|
266
|
-
},
|
|
267
|
-
],
|
|
268
|
-
|
|
269
|
-
// 导航分组
|
|
270
|
-
groups: [
|
|
271
|
-
// 快速导航(手动配置)
|
|
272
|
-
{
|
|
273
|
-
type: 'manual',
|
|
274
|
-
title: '快速导航',
|
|
275
|
-
icon: 'ri:star-line',
|
|
276
|
-
items: [
|
|
277
|
-
{
|
|
278
|
-
title: '博客指南',
|
|
279
|
-
slug: 'blog_docs/README',
|
|
280
|
-
icon: 'ri:book-open-line',
|
|
281
|
-
badge: 'START',
|
|
282
|
-
badgeType: 'success',
|
|
283
|
-
},
|
|
284
|
-
]
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
// 分隔符
|
|
288
|
-
{ type: 'divider', title: '技术文档' },
|
|
289
|
-
|
|
290
|
-
// 技术文档(自动扫描)
|
|
291
|
-
{
|
|
292
|
-
type: 'scan',
|
|
293
|
-
title: '技术文档',
|
|
294
|
-
icon: 'ri:folder-3-line',
|
|
295
|
-
scanPath: 'tech',
|
|
296
|
-
collapsed: false,
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
// LLM 相关(自动扫描)
|
|
300
|
-
{
|
|
301
|
-
type: 'scan',
|
|
302
|
-
title: 'LLM & MCP',
|
|
303
|
-
icon: 'ri:robot-line',
|
|
304
|
-
scanPath: 'LLM-MCP',
|
|
305
|
-
collapsed: false,
|
|
306
|
-
},
|
|
307
|
-
|
|
308
|
-
// 博客文档(自动扫描)
|
|
309
|
-
{
|
|
310
|
-
type: 'scan',
|
|
311
|
-
title: '博客指南',
|
|
312
|
-
icon: 'ri:book-line',
|
|
313
|
-
scanPath: 'blog_docs',
|
|
314
|
-
},
|
|
315
|
-
]
|
|
316
|
-
};
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
## 文件夹结构与导航
|
|
320
|
-
|
|
321
|
-
### 目录结构影响导航
|
|
322
|
-
|
|
323
|
-
```
|
|
324
|
-
content/posts/
|
|
325
|
-
├── tech/
|
|
326
|
-
│ ├── README.md # → "技术文档"(文件夹标题)
|
|
327
|
-
│ ├── vue/
|
|
328
|
-
│ │ ├── README.md # → "Vue 教程"
|
|
329
|
-
│ │ ├── basics.md # → "Vue 基础"
|
|
330
|
-
│ │ └── advanced.md # → "Vue 进阶"
|
|
331
|
-
│ └── react/
|
|
332
|
-
│ ├── README.md # → "React 教程"
|
|
333
|
-
│ └── hooks.md # → "React Hooks"
|
|
334
|
-
└── blog_docs/
|
|
335
|
-
├── README.md # → "博客指南"
|
|
336
|
-
└── 01-quick-start.md # → "快速开始"
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
### README.md 的作用
|
|
340
|
-
|
|
341
|
-
每个文件夹的 `README.md` 用于:
|
|
342
|
-
1. 提供文件夹的显示名称(`title` 字段)
|
|
343
|
-
2. 提供文件夹的图标(`icon` 字段)
|
|
344
|
-
3. 作为该系列的介绍/索引页
|
|
345
|
-
|
|
346
|
-
```yaml
|
|
347
|
-
# tech/vue/README.md
|
|
348
|
-
---
|
|
349
|
-
title: "Vue 3 完全指南" # 显示为文件夹名称
|
|
350
|
-
icon: ri:vuejs-line # 文件夹图标
|
|
351
|
-
description: "从入门到精通的 Vue 3 教程"
|
|
352
|
-
---
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
## 常见场景配置
|
|
356
|
-
|
|
357
|
-
### 技术博客
|
|
358
|
-
|
|
359
|
-
```typescript
|
|
360
|
-
groups: [
|
|
361
|
-
{ type: 'scan', title: '前端', scanPath: 'frontend', icon: 'ri:html5-line' },
|
|
362
|
-
{ type: 'scan', title: '后端', scanPath: 'backend', icon: 'ri:server-line' },
|
|
363
|
-
{ type: 'scan', title: '数据库', scanPath: 'database', icon: 'ri:database-line' },
|
|
364
|
-
{ type: 'scan', title: 'DevOps', scanPath: 'devops', icon: 'ri:cloud-line' },
|
|
365
|
-
]
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
### 教程网站
|
|
369
|
-
|
|
370
|
-
```typescript
|
|
371
|
-
groups: [
|
|
372
|
-
{
|
|
373
|
-
type: 'manual',
|
|
374
|
-
title: '入门',
|
|
375
|
-
icon: 'ri:rocket-line',
|
|
376
|
-
items: [
|
|
377
|
-
{ title: '快速开始', slug: 'getting-started', badge: 'START' },
|
|
378
|
-
{ title: '安装指南', slug: 'installation' },
|
|
379
|
-
{ title: '基本概念', slug: 'concepts' },
|
|
380
|
-
]
|
|
381
|
-
},
|
|
382
|
-
{ type: 'scan', title: '教程', scanPath: 'tutorials' },
|
|
383
|
-
{ type: 'scan', title: 'API 参考', scanPath: 'api' },
|
|
384
|
-
]
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
### 文档站点
|
|
388
|
-
|
|
389
|
-
```typescript
|
|
390
|
-
groups: [
|
|
391
|
-
{
|
|
392
|
-
type: 'mixed',
|
|
393
|
-
title: '指南',
|
|
394
|
-
sections: [
|
|
395
|
-
{
|
|
396
|
-
type: 'manual',
|
|
397
|
-
title: '必读',
|
|
398
|
-
items: [
|
|
399
|
-
{ title: '介绍', slug: 'intro' },
|
|
400
|
-
{ title: '快速开始', slug: 'quickstart' },
|
|
401
|
-
]
|
|
402
|
-
},
|
|
403
|
-
{ type: 'scan', title: '详细指南', scanPath: 'guide' },
|
|
404
|
-
]
|
|
405
|
-
},
|
|
406
|
-
{ type: 'scan', title: 'API', scanPath: 'api' },
|
|
407
|
-
{
|
|
408
|
-
type: 'manual',
|
|
409
|
-
title: '更多',
|
|
410
|
-
items: [
|
|
411
|
-
{ title: 'FAQ', slug: 'faq' },
|
|
412
|
-
{ title: '更新日志', slug: 'changelog' },
|
|
413
|
-
{ title: 'GitHub', link: 'https://github.com/xxx' },
|
|
414
|
-
]
|
|
415
|
-
},
|
|
416
|
-
]
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
## 注意事项
|
|
420
|
-
|
|
421
|
-
::: tip 路径大小写
|
|
422
|
-
`scanPath` 区分大小写,确保与实际文件夹名称一致。
|
|
423
|
-
:::
|
|
424
|
-
|
|
425
|
-
::: warning 排除规则
|
|
426
|
-
使用 `exclude` 排除不需要显示的文件夹:
|
|
427
|
-
```typescript
|
|
428
|
-
{
|
|
429
|
-
type: 'scan',
|
|
430
|
-
scanPath: 'tech',
|
|
431
|
-
exclude: ['drafts', 'archive', 'temp'],
|
|
432
|
-
}
|
|
433
|
-
```
|
|
434
|
-
:::
|
|
435
|
-
|
|
436
|
-
::: info 排序说明
|
|
437
|
-
- `sortBy: 'name'` - 按文件名排序(默认)
|
|
438
|
-
- `sortBy: 'title'` - 按文章标题排序
|
|
439
|
-
- `sortBy: 'date'` - 按发布日期排序
|
|
440
|
-
:::
|
|
441
|
-
|
|
442
|
-
## 下一步
|
|
443
|
-
|
|
444
|
-
- [站点配置](./11-config) - 自定义站点信息和样式
|
|
445
|
-
- [图标系统](./09-icons) - 选择合适的图标
|