Skip to content

Commit 8c33ebe

Browse files
committed
Merge branch 'main' into theme-hope
2 parents 54a45f5 + 81df55f commit 8c33ebe

File tree

9 files changed

+2233
-2487
lines changed

9 files changed

+2233
-2487
lines changed

docs/.vuepress/theme.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88

99
export default hopeTheme({
1010
hostname: 'https://vuejs.press',
11-
iconAssets: 'iconify',
1211

1312
logo: '/images/hero.png',
1413
repo: 'vuepress/core',
@@ -69,9 +68,11 @@ export default hopeTheme({
6968
apiKey: '9a9058b8655746634e01071411c366b8',
7069
indexName: 'vuepress',
7170
searchParameters: {
72-
indexName: 'vuepress',
7371
facetFilters: ['tags:v2'],
7472
},
7573
},
74+
icon: {
75+
assets: 'iconify',
76+
}
7677
},
7778
})

docs/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,4 @@ features:
4343
- title: Bundlers
4444
icon: fa6-solid:boxes-packing
4545
details: Recommended bundler is Vite, while Webpack is also supported. Choose the one you like!
46-
47-
footer: MIT Licensed | Copyright © 2018-present VuePress Community
4846
---

docs/advanced/cookbook/resolving-routes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
icon: fa6-solid:network-wired
3+
---
4+
15
# Resolving Routes
26

37
## Getting all routes

docs/reference/client-api.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const {
7777

7878
The value is the `lang` property of the page data.
7979

80-
## useRoutes
80+
### useRoutes
8181

8282
- Details:
8383

@@ -110,6 +110,24 @@ const {
110110

111111
The properties of current locale have been merged into the root-level properties.
112112

113+
### onContentUpdated
114+
115+
- Details:
116+
117+
When the content of the markdown file changes, the callback is triggered.
118+
119+
This function can only be called during the `setup` phase of the component.
120+
121+
```vue
122+
<script setup>
123+
import { onContentUpdated } from 'vuepress/client'
124+
125+
onContentUpdated((reason) => {
126+
console.log(`content updated reason: ${reason}`)
127+
})
128+
</script>
129+
```
130+
113131
## Helpers
114132

115133
### defineClientConfig
@@ -130,7 +148,7 @@ const {
130148
- Also see:
131149
- [Advanced > Cookbook > Resolving Routes](../advanced/cookbook/resolving-routes.md)
132150

133-
## resolveRoutePath
151+
### resolveRoutePath
134152

135153
- Details:
136154

docs/zh/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,4 @@ features:
4242
- title: 打包工具
4343
icon: fa6-solid:boxes-packing
4444
details: 推荐的打包工具是 Vite ,但也同样支持使用 Webpack 。选一个你喜欢的来使用吧!
45-
46-
footer: MIT 协议 | 版权所有 © 2018-至今 VuePress 社区
4745
---

docs/zh/advanced/cookbook/resolving-routes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
icon: fa6-solid:network-wired
3+
---
4+
15
# 解析路由
26

37
## 获取全部路由

docs/zh/reference/client-api.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ const {
110110

111111
当前 locale 中的配置已经合并到顶层配置中。
112112

113+
### onContentUpdated
114+
115+
- 详情:
116+
117+
当 markdown 文件内容发生变化时,触发回调。
118+
119+
该函数仅能在组件的 `setup` 阶段被调用。
120+
121+
```vue
122+
<script setup>
123+
import { onContentUpdated } from 'vuepress/client'
124+
125+
onContentUpdated((reason) => {
126+
console.log(`content updated reason: ${reason}`)
127+
})
128+
</script>
129+
```
130+
113131
## 工具函数
114132

115133
### defineClientConfig
@@ -130,7 +148,7 @@ const {
130148
- 参考:
131149
- [深入 > Cookbook > 解析路由](../advanced/cookbook/resolving-routes.md)
132150

133-
## resolveRoutePath
151+
### resolveRoutePath
134152

135153
- 详情:
136154

package.json

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vuepress/docs",
3-
"version": "2.0.0-rc.15",
3+
"version": "2.0.0-rc.20",
44
"private": true,
55
"type": "module",
66
"scripts": {
@@ -30,38 +30,43 @@
3030
},
3131
"prettier": "prettier-config-vuepress",
3232
"dependencies": {
33-
"@vuepress/bundler-vite": "2.0.0-rc.19",
34-
"@vuepress/bundler-webpack": "2.0.0-rc.19",
35-
"@vuepress/plugin-docsearch": "2.0.0-rc.66",
36-
"@vuepress/plugin-google-analytics": "2.0.0-rc.66",
37-
"@vuepress/plugin-register-components": "2.0.0-rc.66",
38-
"@vuepress/plugin-shiki": "2.0.0-rc.66",
39-
"@vuepress/theme-default": "2.0.0-rc.66",
33+
"@vuepress/bundler-vite": "2.0.0-rc.20",
34+
"@vuepress/bundler-webpack": "2.0.0-rc.20",
35+
"@vuepress/plugin-docsearch": "2.0.0-rc.79",
36+
"@vuepress/plugin-google-analytics": "2.0.0-rc.79",
37+
"@vuepress/plugin-register-components": "2.0.0-rc.79",
38+
"@vuepress/plugin-shiki": "2.0.0-rc.79",
39+
"@vuepress/theme-default": "2.0.0-rc.79",
4040
"http-server": "^14.1.1",
41-
"sass-embedded": "^1.83.0",
42-
"sass-loader": "^16.0.4",
41+
"sass-embedded": "^1.85.0",
42+
"sass-loader": "^16.0.5",
4343
"vue": "^3.5.13",
44-
"vuepress": "2.0.0-rc.19",
45-
"vuepress-theme-hope": "2.0.0-rc.64"
44+
"vuepress": "2.0.0-rc.20",
45+
"vuepress-theme-hope": "2.0.0-rc.72"
4646
},
4747
"devDependencies": {
48-
"@commitlint/cli": "^19.6.0",
49-
"@commitlint/config-conventional": "^19.6.0",
50-
"bumpp": "^9.9.1",
51-
"eslint": "^9.17.0",
48+
"@commitlint/cli": "^19.7.1",
49+
"@commitlint/config-conventional": "^19.7.1",
50+
"bumpp": "^10.0.3",
51+
"eslint": "^9.21.0",
5252
"eslint-config-vuepress": "^5.2.4",
5353
"husky": "^9.1.7",
5454
"nano-staged": "^0.8.0",
55-
"prettier": "^3.4.2",
55+
"prettier": "^3.5.2",
5656
"prettier-config-vuepress": "^5.0.0",
5757
"rimraf": "^6.0.1",
58-
"sort-package-json": "^2.12.0",
59-
"taze": "^0.18.0",
58+
"sort-package-json": "^2.14.0",
59+
"taze": "^18.6.0",
6060
"tsconfig-vuepress": "^5.2.1",
61-
"typescript": "^5.7.2"
61+
"typescript": "^5.7.3"
6262
},
63-
"packageManager": "pnpm@9.15.0",
63+
"packageManager": "pnpm@10.4.1",
6464
"engines": {
6565
"node": ">=18.19.0"
66+
},
67+
"pnpm": {
68+
"onlyBuiltDependencies": [
69+
"esbuild"
70+
]
6671
}
6772
}

0 commit comments

Comments
 (0)