Skip to content

Commit

Permalink
perf: update vuepress to rc.9
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Mar 23, 2024
1 parent c1a9868 commit 3cada0b
Show file tree
Hide file tree
Showing 20 changed files with 789 additions and 1,092 deletions.
9 changes: 6 additions & 3 deletions docs/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ export const zhNavbar = [
{
text: '指南',
icon: 'icon-park-outline:guide-board',
link: '/guide/intro/',
// link: '/guide/intro/',
link: '/notes/theme/guide/介绍.md',
activeMatch: '^/guide/',
},
{
text: '配置',
icon: 'icon-park-outline:setting-two',
link: '/config/intro/',
// link: '/config/intro/',
link: '/notes/theme/config/配置说明.md',
activeMatch: '^/config/',
},
{
text: '插件',
icon: 'clarity:plugin-line',
link: '/plugins/',
// link: '/plugins/',
link: '/notes/plugins/README.md',
activeMatch: '^/plugins/',
},
{
Expand Down
9 changes: 9 additions & 0 deletions docs/notes/theme/config/导航栏配置.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ export default defineUserConfig({

```ts
type NavItem = string | {
/**
* 导航栏文本
*/
text: string
/**
* 导航栏链接
* - 可以是外部链接
* - 可以是 frontmatter 中的 permalink
* - 可以是相对于 `sourceDir` 的 markdown文件路径,请注意需要以 `/` 开头
*/
link: string
/**
* 支持 iconify 图标,直接使用 iconify name 即可自动加载
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"docs:serve": "anywhere -s -h localhost -d .vuepress/dist"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.8",
"@vuepress/bundler-vite": "2.0.0-rc.9",
"anywhere": "^1.6.0",
"chart.js": "^4.4.2",
"echarts": "^5.5.0",
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "1.0.0-rc.45",
"private": true,
"packageManager": "pnpm@8.15.4",
"packageManager": "pnpm@8.15.5",
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
"license": "MIT",
"keywords": [
Expand All @@ -15,7 +15,7 @@
],
"engines": {
"node": "^18 || >=20.0.0",
"pnpm": ">=7"
"pnpm": ">=8"
},
"scripts": {
"build": "pnpm run clean && pnpm run build:package",
Expand All @@ -39,7 +39,7 @@
"release:version": "bumpp package.json plugins/*/package.json theme/package.json --execute=\"pnpm release:changelog\" --commit \"build: publish v%s\" --all --tag --push"
},
"devDependencies": {
"@commitlint/cli": "^19.1.0",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@pengzhanbo/eslint-config-vue": "^1.7.0",
"@pengzhanbo/stylelint-config": "^1.7.0",
Expand All @@ -58,12 +58,12 @@
"rimraf": "^5.0.5",
"stylelint": "^16.2.1",
"tsconfig-vuepress": "^4.5.0",
"typescript": "^5.4.2",
"vite": "^5.1.6"
"typescript": "^5.4.3",
"vite": "^5.2.4"
},
"pnpm": {
"patchedDependencies": {
"@vuepress/markdown@2.0.0-rc.8": "patches/@vuepress__markdown@2.0.0-rc.8.patch"
"@vuepress/markdown@2.0.0-rc.9": "patches/@vuepress__markdown@2.0.0-rc.9.patch"
}
},
"lint-staged": {
Expand Down
13 changes: 13 additions & 0 deletions patches/@vuepress__markdown@2.0.0-rc.9.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/index.js b/dist/index.js
index 057c2897fdb1a01960724b83707a9c9d28205988..169e64c5e1d4b40aa48cdf07d0fb807e404f000e 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -267,7 +267,7 @@ var codePlugin = (md, {
const info = token.info ? md.utils.unescapeAll(token.info).trim() : "";
const language = resolveLanguage(info);
const languageClass = `${options.langPrefix}${language.name}`;
- const code = options.highlight?.(token.content, language.name, "") || md.utils.escapeHtml(token.content);
+ const code = options.highlight?.(token.content, language.name, info || "") || md.utils.escapeHtml(token.content);
token.attrJoin("class", languageClass);
let result = code.startsWith("<pre") ? code : `<pre${slf.renderAttrs(token)}><code>${code}</code></pre>`;
const useVPre = resolveVPre(info) ?? vPreBlock;
2 changes: 1 addition & 1 deletion plugins/plugin-auto-frontmatter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"chokidar": "^3.6.0",
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-baidu-tongji/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-blog-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@vue/devtools-api": "6.5.1",
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-caniuse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"markdown-it-container": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-content-update/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"vue": "^3.4.21"
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 @@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@vuepress-plume/plugin-content-update": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-iconify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@iconify/vue": "^4.1.1",
Expand Down
8 changes: 4 additions & 4 deletions plugins/plugin-netlify-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
Expand All @@ -50,13 +50,13 @@
"chokidar": "^3.6.0",
"cpx2": "^7.0.1",
"dotenv": "^16.4.5",
"esbuild": "^0.20.1",
"esbuild": "^0.20.2",
"execa": "^8.0.1",
"netlify-cli": "^17.19.3",
"netlify-cli": "^17.20.1",
"portfinder": "^1.0.32"
},
"devDependencies": {
"@types/node": "^20.11.27"
"@types/node": "^20.11.30"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-notes-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@vue/devtools-api": "6.5.1",
Expand Down
4 changes: 2 additions & 2 deletions plugins/plugin-page-collection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@netlify/functions": "^2.6.0",
"leancloud-storage": "^4.15.2",
"vue": "^3.4.21",
"vue-router": "4.2.5",
"vue-router": "4.3.0",
"vuepress-plugin-netlify-functions": "workspace:*"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions plugins/plugin-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@vuepress/helper": "2.0.0-rc.15",
"@vuepress/helper": "2.0.0-rc.19",
"@vueuse/core": "^10.9.0",
"@vueuse/integrations": "^10.9.0",
"chokidar": "^3.6.0",
Expand Down
12 changes: 6 additions & 6 deletions plugins/plugin-shikiji/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@
"ts": "tsc -b tsconfig.build.json"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.8"
"vuepress": "2.0.0-rc.9"
},
"dependencies": {
"@shikijs/transformers": "^1.1.7",
"@shikijs/twoslash": "^1.1.7",
"@shikijs/transformers": "^1.2.0",
"@shikijs/twoslash": "^1.2.0",
"@types/hast": "^3.0.4",
"floating-vue": "^5.2.2",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-gfm": "^3.0.0",
"mdast-util-to-hast": "^13.1.0",
"nanoid": "^5.0.6",
"shiki": "^1.1.7",
"twoslash": "^0.2.4",
"twoslash-vue": "^0.2.4"
"shiki": "^1.2.0",
"twoslash": "^0.2.5",
"twoslash-vue": "^0.2.5"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 3cada0b

Please sign in to comment.