Skip to content

Commit 5d006f4

Browse files
committed
feat: 🚀 插件发版
1 parent a3123aa commit 5d006f4

File tree

29 files changed

+126
-56
lines changed

29 files changed

+126
-56
lines changed

.changeset/config.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@vitepress-theme-teek/docs-locales",
1313
"@vitepress-theme-teek-docs/locales-root",
1414
"@vitepress-theme-teek/build",
15-
"vitepress-theme-teek-docs"
15+
"vitepress-theme-teek-docs",
16+
"vitepress-theme-teek"
1617
]
1718
}

docs/01.指南/目录.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: 指南
3+
date: 2025-03-29 23:17:35
4+
permalink: /guide
5+
layout: page
6+
catalogue: true
7+
path: 01.指南
8+
desc: Teek 使用指南
9+
sidebar: false
10+
article: false
11+
---

plugins/vitepress-plugin-auto-frontmatter/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# vitepress-plugin-auto-frontmatter
22

3+
## 1.0.7
4+
5+
### Patch Changes
6+
7+
- 文档更新
8+
39
## 1.0.6
410

511
### Patch Changes

plugins/vitepress-plugin-auto-frontmatter/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vitepress-plugin-auto-frontmatter
22

3-
这是一个适用于 `vitepress` 的 Vite 插件,`vitepress` 启动时,插件会给指定的 markdown 自动生成 `frontmatter`
3+
这是一个适用于 `vitepress` 的 Vite 插件,`vitepress` 启动时,插件会给指定的 Markdown 自动生成 `frontmatter`
44

55
## ✨ Feature
66

@@ -35,9 +35,9 @@ export default defineConfig({
3535

3636
> 说明:该插件仅限项目启动时生效。
3737
38-
插件默认忽略 `frontmatter``layout: home``["node_modules", "dist"]` 目录下的文件,且只扫描 markdown 文档。
38+
插件默认忽略 `frontmatter``layout: home``["node_modules", "dist"]` 目录下的文件,且只扫描 Markdown 文档。
3939

40-
插件默认给 markdown 文件生成 `title``date` 两个属性,其中 `title` 为文件名(支持带序号的文件名,如 `01.xx.md`),`date` 为文件的创建日期。
40+
插件默认给 Markdown 文件生成 `title``date` 两个属性,其中 `title` 为文件名(支持带序号的文件名,如 `01.xx.md`),`date` 为文件的创建日期。
4141

4242
```yaml
4343
---
@@ -53,8 +53,8 @@ date: yyyy-MM-dd hh:mm:ss
5353
| name | description | type | default |
5454
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | --------- | --- |
5555
| pattern | 扫描的文件路径表达式,为 global 表达式 | `string | string[]` | |
56-
| include | include 指定的对象如果不在 markdown frontmatter 存在,则忽略该文件 | `Record<string, any>` | |
57-
| exclude | exclude 指定的对象如果在 markdown frontmatter 存在,则忽略该文件。当 include 和 exclude 存在相同文件时,exclude 优先级高 | `Record<string, any>` | |
56+
| include | include 指定的对象如果不在 Markdown frontmatter 存在,则忽略该文件 | `Record<string, any>` | |
57+
| exclude | exclude 指定的对象如果在 Markdown frontmatter 存在,则忽略该文件。当 include 和 exclude 存在相同文件时,exclude 优先级高 | `Record<string, any>` | |
5858
| transform | 转换处理好的 frontmatter,该函数需要返回一个新的 frontmatter 或只返回 undefined,如果返回 {},则清空 MD 文件本身存在的 frontmatter | `(frontmatter: Record<string, any>, fileInfo: FileInfo) => Record<string, any> | void` | |
5959
| globOptions | tinyglobby 的配置项,\*插件默认已经忽略 node_modules 和 dist 目录的所有文件 | `GlobOptions` | |
6060

@@ -273,11 +273,11 @@ export interface AutoFrontmatterOption {
273273
*/
274274
pattern?: string | string[];
275275
/**
276-
* include 指定的对象如果不在 markdown frontmatter 存在,则忽略该文件
276+
* include 指定的对象如果不在 Markdown frontmatter 存在,则忽略该文件
277277
*/
278278
include?: Record<string, any>;
279279
/**
280-
* exclude 指定的对象如果在 markdown frontmatter 存在,则忽略该文件。当 include 和 exclude 存在相同文件时,exclude 优先级高
280+
* exclude 指定的对象如果在 Markdown frontmatter 存在,则忽略该文件。当 include 和 exclude 存在相同文件时,exclude 优先级高
281281
*/
282282
exclude?: Record<string, any>;
283283
/**

plugins/vitepress-plugin-auto-frontmatter/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "vitepress-plugin-auto-frontmatter",
33
"type": "module",
4-
"version": "1.0.6",
5-
"description": "自动给 markdown 文档添加 frontmatter",
4+
"version": "1.0.7",
5+
"description": "自动给 Markdown 文档添加 frontmatter",
66
"author": {
77
"name": "teeker",
88
"email": "[email protected]",

plugins/vitepress-plugin-auto-frontmatter/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function VitePluginVitePressAutoFrontmatter(
4444
}
4545

4646
/**
47-
* 自动生成 frontmatter 并写入到 markdown 文件
47+
* 自动生成 frontmatter 并写入到 Markdown 文件
4848
*
4949
* @param filePaths 文件路径列表
5050
* @param option 插件配置项

plugins/vitepress-plugin-auto-frontmatter/src/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export interface AutoFrontmatterOption {
66
*/
77
pattern?: string | string[];
88
/**
9-
* include 指定的对象如果不在 markdown frontmatter 存在,则忽略该文件
9+
* include 指定的对象如果不在 Markdown frontmatter 存在,则忽略该文件
1010
*/
1111
include?: Record<string, any>;
1212
/**
13-
* exclude 指定的对象如果在 markdown frontmatter 存在,则忽略该文件。当 include 和 exclude 存在相同文件时,exclude 优先级高
13+
* exclude 指定的对象如果在 Markdown frontmatter 存在,则忽略该文件。当 include 和 exclude 存在相同文件时,exclude 优先级高
1414
*/
1515
exclude?: Record<string, any>;
1616
/**

plugins/vitepress-plugin-catalogue/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# vitepress-plugin-catalogue
22

3+
## 1.0.9
4+
5+
### Patch Changes
6+
7+
- 文档更新
8+
39
## 1.0.8
410

511
### Patch Changes

plugins/vitepress-plugin-catalogue/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vitepress-plugin-catalogue
22

3-
这是一个适用于 `vitepress` 的 Vite 插件,`vitepress` 启动会扫描 markdown 文档,对 `formatter.catalogue` 为 true 的文档进行分析。
3+
这是一个适用于 `vitepress` 的 Vite 插件,`vitepress` 启动会扫描 Markdown 文档,对 `formatter.catalogue` 为 true 的文档进行分析。
44

55
## ✨ Feature
66

@@ -32,9 +32,9 @@ export default defineConfig({
3232
});
3333
```
3434

35-
> 说明:该插件仅限项目启动时生效,如果给 markdown 添加 `catalogue` 功能,需要重启项目生效。
35+
> 说明:该插件仅限项目启动时生效,如果给 Markdown 添加 `catalogue` 功能,需要重启项目生效。
3636
37-
插件默认忽略 `["node_modules", "dist", ".vitepress", "public"]` 目录下的文件,且只扫描 markdown 文档。
37+
插件默认忽略 `["node_modules", "dist", ".vitepress", "public"]` 目录下的文件,且只扫描 Markdown 文档。
3838

3939
## 🛠️ Options
4040

@@ -127,7 +127,7 @@ path 是基于 [srcDir](https://vitepress.dev/zh/reference/site-config#srcdir)
127127
}
128128
```
129129

130-
如果某个 markdown 文档不想被纳入目录里,则:
130+
如果某个 Markdown 文档不想被纳入目录里,则:
131131

132132
```yaml
133133
---

plugins/vitepress-plugin-catalogue/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "vitepress-plugin-catalogue",
33
"type": "module",
4-
"version": "1.0.8",
5-
"description": "扫描 markdown 文档,获取目录信息",
4+
"version": "1.0.9",
5+
"description": "扫描 Markdown 文档,获取目录信息",
66
"author": {
77
"name": "teeker",
88
"email": "[email protected]",

plugins/vitepress-plugin-doc-analysis/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# vitepress-plugin-doc-analysis
22

3+
## 1.0.10
4+
5+
### Patch Changes
6+
7+
- 文档更新
8+
39
## 1.0.9
410

511
### Patch Changes

plugins/vitepress-plugin-doc-analysis/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# vitepress-plugin-doc-analysis
22

3-
这是一个适用于 `vitepress` 的 Vite 插件,在 `vitepress` 启动后分析 markdown 文档。
3+
这是一个适用于 `vitepress` 的 Vite 插件,在 `vitepress` 启动后分析 Markdown 文档。
44

55
## ✨ Feature
66

7-
- 🚀 自动分析 markdown 文档信息,挂载到 `themeConfig.docAnalysisInfo`
7+
- 🚀 自动分析 Markdown 文档信息,挂载到 `themeConfig.docAnalysisInfo`
88
- 🚀 支持 locales 国际化的文档分析,挂载到 `locales.[lang].themeConfig.docAnalysisInfo`
99

1010
## 🕯️ Install
@@ -33,9 +33,9 @@ export default defineConfig({
3333
});
3434
```
3535

36-
> 说明:该插件仅限项目启动时生效,已改动或新添加的 markdown 需要重启项目才能生效。
36+
> 说明:该插件仅限项目启动时生效,已改动或新添加的 Markdown 需要重启项目才能生效。
3737
38-
插件默认忽略 `["node_modules", "dist", ".vitepress", "public"]` 目录下的文件,且只扫描 markdown 文档。
38+
插件默认忽略 `["node_modules", "dist", ".vitepress", "public"]` 目录下的文件,且只扫描 Markdown 文档。
3939

4040
## 🛠️ Options
4141

@@ -62,7 +62,7 @@ const { fileList, totalFileWords, eachFileWords, lastCommitTime }: DocAnalysis =
6262
// 如果处在国际化环境下,vitepress 会将当前语言的 themeConfig 放到 theme 里,与原先的 theme 进行合并
6363
```
6464

65-
如果不希望某个 markdown 文档被插件分析,请在该文档 `frontmatter` 配置:
65+
如果不希望某个 Markdown 文档被插件分析,请在该文档 `frontmatter` 配置:
6666

6767
```yaml
6868
---

plugins/vitepress-plugin-doc-analysis/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "vitepress-plugin-doc-analysis",
33
"type": "module",
4-
"version": "1.0.9",
5-
"description": "扫描 markdown 文档,对文档进行分析,计算字数、阅读时间等数据",
4+
"version": "1.0.10",
5+
"description": "扫描 Markdown 文档,对文档进行分析,计算字数、阅读时间等数据",
66
"author": {
77
"name": "teeker",
88
"email": "[email protected]",

plugins/vitepress-plugin-file-content-loader/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# vitepress-plugin-file-content-loader
22

3+
## 1.0.8
4+
5+
### Patch Changes
6+
7+
- 文档更新
8+
39
## 1.0.7
410

511
### Patch Changes

plugins/vitepress-plugin-file-content-loader/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export default defineConfig({
3232
});
3333
```
3434

35-
> 说明:该插件仅限项目启动时生效,已改动或新添加的 markdown 需要重启项目才能生效。
35+
> 说明:该插件仅限项目启动时生效,已改动或新添加的 Markdown 需要重启项目才能生效。
3636
37-
插件默认忽略 `[**/node_modules/**", "**/dist/**]` 目录下的文件,且只扫描 markdown 文档。
37+
插件默认忽略 `[**/node_modules/**", "**/dist/**]` 目录下的文件,且只扫描 Markdown 文档。
3838

3939
## 🛠️ Options
4040

plugins/vitepress-plugin-file-content-loader/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vitepress-plugin-file-content-loader",
33
"type": "module",
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"description": "扫描项目里的指定文件,处理文件内容",
66
"author": {
77
"name": "teeker",

plugins/vitepress-plugin-md-h1/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# vitepress-plugin-md-h1
22

3+
## 1.0.8
4+
5+
### Patch Changes
6+
7+
- 文档更新
8+
39
## 1.0.7
410

511
### Patch Changes

plugins/vitepress-plugin-md-h1/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# vitepress-plugin-md-h1
22

3-
这是一个适用于 `vitepress` 的 Vite 插件,在 `vitepress` 启动后自动生成一级标题到 markdown 文档开头处(假如 markdown 文档没有设置过一级标题)。
3+
这是一个适用于 `vitepress` 的 Vite 插件,在 `vitepress` 启动后自动生成一级标题到 Markdown 文档开头处(假如 Markdown 文档没有设置过一级标题)。
44

5-
> 说明:只在页面加载 markdown 内容时生成一级标题,并不会真正修改 markdown 文档内容。
5+
> 说明:只在页面加载 Markdown 内容时生成一级标题,并不会真正修改 Markdown 文档内容。
66
7-
插件默认不会给 `frontmatter.layout``home`markdown 注入一级标题。
7+
插件默认不会给 `frontmatter.layout``home`Markdown 注入一级标题。
88

99
## ✨ Feature
1010

11-
- 🚀 将 `frontmatter.title` 或「文件名」作为一级标题注入到 markdown 文档开头处
11+
- 🚀 将 `frontmatter.title` 或「文件名」作为一级标题注入到 Markdown 文档开头处
1212

1313
## 🕯️ Install
1414

@@ -36,7 +36,7 @@ export default defineConfig({
3636
});
3737
```
3838

39-
> 说明:该插件仅限项目启动时生效,已改动或新添加的 markdown 需要重启项目才能生效。
39+
> 说明:该插件仅限项目启动时生效,已改动或新添加的 Markdown 需要重启项目才能生效。
4040
4141
## 🛠️ Options
4242

@@ -66,15 +66,15 @@ export interface MdH1Option {
6666

6767
## 📖 Usage
6868

69-
如果不希望某个 markdown 文档注入一级标题,请在该文档 `frontmatter` 配置:
69+
如果不希望某个 Markdown 文档注入一级标题,请在该文档 `frontmatter` 配置:
7070

7171
```yaml
7272
---
7373
noTitle: false
7474
---
7575
```
7676

77-
如果不希望某个目录下的所有 markdown 文档注入一级标题,则使用 `ignoreList` 配置项:
77+
如果不希望某个目录下的所有 Markdown 文档注入一级标题,则使用 `ignoreList` 配置项:
7878

7979
```typescript
8080
import { defineConfig } from "vitepress";

plugins/vitepress-plugin-md-h1/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "vitepress-plugin-md-h1",
33
"type": "module",
4-
"version": "1.0.7",
5-
"description": "添加一级标题到 markdown 文档",
4+
"version": "1.0.8",
5+
"description": "添加一级标题到 Markdown 文档",
66
"author": {
77
"name": "teeker",
88
"email": "[email protected]",

plugins/vitepress-plugin-permalink/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# vitepress-plugin-permalink
22

3+
## 1.0.15
4+
5+
### Patch Changes
6+
7+
- 文档更新
8+
39
## 1.0.14
410

511
### Patch Changes

plugins/vitepress-plugin-permalink/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# vitepress-plugin-permalink
22

3-
这是一个适用于 `vitepress` 的 Vite 插件,在 `vitepress` 启动后读取 markdown 文档 `frontmatter``permalink`
3+
这是一个适用于 `vitepress` 的 Vite 插件,在 `vitepress` 启动后读取 Markdown 文档 `frontmatter``permalink`
44

55
## ✨ Feature
66

7-
- 🚀🚀 支持给 markdown 文档设置唯一的访问 **永久链接**,不再因为 markdown 文档路径移动而导致访问地址发生变化
8-
- 🚀 读取 markdown 文档 `frontmatter``permalink`,挂载到 `themeConfig.permalinks`
7+
- 🚀🚀 支持给 Markdown 文档设置唯一的访问 **永久链接**,不再因为 Markdown 文档路径移动而导致访问地址发生变化
8+
- 🚀 读取 Markdown 文档 `frontmatter``permalink`,挂载到 `themeConfig.permalinks`
99
- 🚀 提供 `usePermalink` hooks 函数拓展 `router` 方法,支持 `router.push(href)` 跳转到永久链接或实际的文件路径
1010
- 🚀 支持 locales 国际化,自动给 **永久链接** 添加语言前缀,不同语言的永久链接不会重复
1111
- 🚀 支持 rewrite 路由重写,最终得到的文档路径是 rewrite 路由重写后的路径
@@ -37,9 +37,9 @@ export default defineConfig({
3737
});
3838
```
3939

40-
> 说明:该插件仅限项目启动时生效,已改动或新添加的 markdown 需要重启项目才能生效。
40+
> 说明:该插件仅限项目启动时生效,已改动或新添加的 Markdown 需要重启项目才能生效。
4141
42-
插件默认忽略 `["node_modules", "dist", ".vitepress", "public"]` 目录下的文件,且只扫描 markdown 文档。
42+
插件默认忽略 `["node_modules", "dist", ".vitepress", "public"]` 目录下的文件,且只扫描 Markdown 文档。
4343

4444
## 🛠️ Options
4545

plugins/vitepress-plugin-permalink/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "vitepress-plugin-permalink",
33
"type": "module",
4-
"version": "1.0.14",
5-
"description": "扫描 markdown 文档,生成永久链接",
4+
"version": "1.0.15",
5+
"description": "扫描 Markdown 文档,生成永久链接",
66
"author": {
77
"name": "teeker",
88
"email": "[email protected]",

plugins/vitepress-plugin-sidebar-resolve/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# vitepress-plugin-sidebar-resolve
22

3+
## 1.0.8
4+
5+
### Patch Changes
6+
7+
- 文档更新
8+
39
## 1.0.7
410

511
### Patch Changes

0 commit comments

Comments
 (0)