Skip to content

Commit

Permalink
feat: update to latest vuepress rc (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope authored May 16, 2024
1 parent 4298469 commit 129d05d
Show file tree
Hide file tree
Showing 63 changed files with 380 additions and 549 deletions.
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"docs:serve": "http-server -a localhost .vuepress/dist"
},
"dependencies": {
"@mdit/plugin-footnote": "0.11.0",
"@vuepress/bundler-vite": "2.0.0-rc.9",
"@vuepress/bundler-webpack": "2.0.0-rc.9",
"@mdit/plugin-footnote": "0.12.0",
"@vuepress/bundler-vite": "2.0.0-rc.11",
"@vuepress/bundler-webpack": "2.0.0-rc.11",
"@vuepress/plugin-back-to-top": "workspace:*",
"@vuepress/helper": "workspace:*",
"@vuepress/plugin-catalog": "workspace:*",
Expand All @@ -33,6 +33,6 @@
"mathjax-full": "3.2.2",
"sass-loader": "^14.2.1",
"vue": "^3.4.27",
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
}
}
14 changes: 7 additions & 7 deletions docs/themes/default/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,29 +312,29 @@ Frontmatter in this section will only take effect in normal pages.

### prev

- Type: `NavLink | string`
- Type: `AutoLinkConfig | string`

- Details:

Specify the link of the previous page.

If you don't set this frontmatter, the link will be inferred from the sidebar config.

To configure the prev link manually, you can set this frontmatter to a `NavLink` object or a string:
To configure the prev link manually, you can set this frontmatter to a `AutoLinkConfig` object or a string:

- A `NavLink` object should have a `text` field and a `link` field.
- A string should be the path to the target page file. It will be converted to a `NavLink` object, whose `text` is the page title, and `link` is the page route path.
- A `AutoLinkConfig` object should have a `text` field and a `link` field.
- A string should be the path to the target page file. It will be converted to a `AutoLinkConfig` object, whose `text` is the page title, and `link` is the page route path.

- Example:

```md
---
# NavLink
# AutoLinkConfig
prev:
text: Get Started
link: /guide/getting-started.html

# NavLink - external url
# AutoLinkConfig - external url
prev:
text: GitHub
link: https://github.com
Expand All @@ -349,7 +349,7 @@ prev: ../../guide/getting-started.md

### next

- Type: `NavLink | string`
- Type: `AutoLinkConfig | string`

- Details:

Expand Down
14 changes: 7 additions & 7 deletions docs/zh/themes/default/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,29 +312,29 @@ features:

### prev

- 类型: `NavLink | string`
- 类型: `AutoLinkConfig | string`

- 详情:

上一个页面的链接。

如果你不设置该 Frontmatter ,该链接会自动根据侧边栏配置进行推断。

为了手动配置上一页面的链接,你可以将其设置为一个 `NavLink` 对象或者一个字符串:
为了手动配置上一页面的链接,你可以将其设置为一个 `AutoLinkConfig` 对象或者一个字符串:

- `NavLink` 对象应该有一个 `text` 字段和一个 `link` 字段。
- 字符串应为目标页面文件的路径。它将会被转换为 `NavLink` 对象,将页面标题作为 `text` ,将页面路由路径作为 `link`
- `AutoLinkConfig` 对象应该有一个 `text` 字段和一个 `link` 字段。
- 字符串应为目标页面文件的路径。它将会被转换为 `AutoLinkConfig` 对象,将页面标题作为 `text` ,将页面路由路径作为 `link`

- 示例:

```md
---
# NavLink
# AutoLinkConfig
prev:
text: Get Started
link: /guide/getting-started.html

# NavLink - 外部 URL
# AutoLinkConfig - 外部 URL
prev:
text: GitHub
link: https://github.com
Expand All @@ -349,7 +349,7 @@ prev: ../../guide/getting-started.md

### next

- 类型: `NavLink | string`
- 类型: `AutoLinkConfig | string`

- 详情:

Expand Down
6 changes: 3 additions & 3 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"e2e:dev-webpack": "cross-env E2E_COMMAND=dev E2E_BUNDLER=webpack playwright test"
},
"dependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.9",
"@vuepress/bundler-webpack": "2.0.0-rc.9",
"@vuepress/bundler-vite": "2.0.0-rc.11",
"@vuepress/bundler-webpack": "2.0.0-rc.11",
"@vuepress/plugin-blog": "workspace:*",
"@vuepress/plugin-catalog": "workspace:*",
"@vuepress/plugin-copyright": "workspace:*",
Expand All @@ -31,7 +31,7 @@
"sass": "^1.77.1",
"sass-loader": "^14.2.1",
"vue": "^3.4.27",
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"devDependencies": {
"@playwright/test": "^1.44.0"
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,18 @@
"sass": "1.77.1",
"sort-package-json": "^2.10.0",
"tsconfig-vuepress": "^4.5.0",
"tsx": "^4.10.2",
"tsx": "^4.10.3",
"typescript": "^5.4.5",
"vite": "~5.2.11",
"vitest": "^1.6.0",
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=18.19.0"
},
"pnpm": {
"overrides": {
"@types/markdown-it": "^14.1.1",
"artalk": "2.8.5"
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-active-header-links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions plugins/plugin-append-date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"@vuepress/helper": "workspace:~"
},
"peerDependencies": {
"@vuepress/plugin-git": "~2.0.0-rc.22",
"vuepress": "2.0.0-rc.9"
"@vuepress/plugin-git": "workspace:~",
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-back-to-top/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"devDependencies": {
"sass": "^1.77.1"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-baidu-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-catalog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"devDependencies": {
"sass": "^1.77.1"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-comment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@waline/client": "^3.1.0",
"artalk": "^2.7.3",
"twikoo": "^1.5.0",
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"devDependencies": {
"sass": "^1.77.1"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-copy-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"sass": "^1.77.1"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-copyright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-docsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-feed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@vuepress/plugin-git": "workspace:*"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"execa": "^9.1.0"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-google-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"clean": "rimraf --glob ./lib ./*.tsbuildinfo"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-google-tag-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"clean": "rimraf --glob ./lib ./*.tsbuildinfo"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-links-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@vuepress/helper": "workspace:~"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
18 changes: 10 additions & 8 deletions plugins/plugin-links-check/src/node/checkMarkdownLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ export const checkMarkdownLink = (
...markdownLinks
// Absolute markdown links
.filter(({ raw }) => isLinkAbsolute(raw))
.filter(({ absolute }) =>
// Check whether the page exists
pages.every(
({ filePathRelative }) =>
!filePathRelative ||
(`${options.base}${filePathRelative}` !== decodeURI(absolute) &&
!isIgnoreLink(absolute)),
),
.filter(
({ absolute }) =>
// Check whether the page exists
absolute &&
pages.every(
({ filePathRelative }) =>
!filePathRelative ||
(`${options.base}${filePathRelative}` !== decodeURI(absolute) &&
!isIgnoreLink(absolute)),
),
),
].map(({ raw }) => raw)

Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-markdown-container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"markdown-it-container": "^4.0.0"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"devDependencies": {
"markdown-it": "^14.1.0"
Expand Down
10 changes: 5 additions & 5 deletions plugins/plugin-markdown-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
},
"dependencies": {
"@types/markdown-it": "^14.1.1",
"@mdit/plugin-figure": "^0.11.0",
"@mdit/plugin-img-lazyload": "^0.11.0",
"@mdit/plugin-img-mark": "^0.11.0",
"@mdit/plugin-img-size": "^0.11.0",
"@mdit/plugin-figure": "^0.12.0",
"@mdit/plugin-img-lazyload": "^0.12.0",
"@mdit/plugin-img-mark": "^0.12.0",
"@mdit/plugin-img-size": "^0.12.0",
"@vuepress/helper": "workspace:~"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-markdown-math/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"peerDependencies": {
"katex": "^0.16.10",
"vuepress": "2.0.0-rc.9",
"vuepress": "2.0.0-rc.11",
"mathjax-full": "^3.2.2"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-medium-zoom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-notice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"devDependencies": {
"sass": "^1.77.1"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-nprogress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"vue": "^3.4.27"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-palette/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"chokidar": "^3.6.0"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-photo-swipe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"sass": "^1.77.1"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.9"
"vuepress": "2.0.0-rc.11"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 129d05d

Please sign in to comment.