diff --git a/.vscode/settings.json b/.vscode/settings.json
index a46c7cc3..7b2806a2 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -8,6 +8,9 @@
"[markdown]": {
"files.trimTrailingWhitespace": false
},
+ "[typescript]": {
+ "editor.defaultFormatter": "Vue.volar"
+ },
"css.validate": false,
"scss.validate": false,
"less.validate": false,
diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts
index 20a13535..77e42562 100644
--- a/docs/.vuepress/config.ts
+++ b/docs/.vuepress/config.ts
@@ -1,8 +1,8 @@
import * as path from 'node:path'
import process from 'node:process'
+import { defineUserConfig } from 'vuepress'
import { viteBundler } from '@vuepress/bundler-vite'
import { webpackBundler } from '@vuepress/bundler-webpack'
-import { defineUserConfig } from '@vuepress/cli'
import { theme } from './theme.js'
export default defineUserConfig({
@@ -14,7 +14,10 @@ export default defineUserConfig({
'/': { title: 'Plume主题', description: '', lang: 'zh-CN' },
'/en/': { title: 'Plume Theme', description: '', lang: 'en-US' },
},
- bundler: process.env.DOCS_BUNDLER === 'webpack' ? webpackBundler() : viteBundler(),
+
+ // specify bundler via environment variable
+ bundler:
+ process.env.DOCS_BUNDLER === 'webpack' ? webpackBundler() : viteBundler(),
theme,
})
diff --git a/docs/package.json b/docs/package.json
index 2c874353..6e32d7ed 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -3,17 +3,17 @@
"type": "module",
"private": true,
"scripts": {
- "docs:build": "vuepress-cli build --clean-cache",
+ "docs:build": "vuepress build --clean-cache",
"docs:clean": "rimraf .vuepress/.temp .vuepress/.cache .vuepress/dist",
- "docs:dev": "vuepress-cli dev --clean-cache --clean-temp",
+ "docs:dev": "vuepress dev --clean-cache --clean-temp",
"docs:serve": "anywhere -s -h localhost -d .vuepress/dist"
},
+ "peerDependencies": {
+ "vuepress": "2.0.0-rc.2"
+ },
"dependencies": {
- "@vuepress/bundler-vite": "2.0.0-rc.0",
- "@vuepress/bundler-webpack": "2.0.0-rc.0",
- "@vuepress/cli": "2.0.0-rc.0",
- "@vuepress/client": "2.0.0-rc.0",
- "@vuepress/utils": "2.0.0-rc.0",
+ "@vuepress/bundler-vite": "2.0.0-rc.2",
+ "@vuepress/bundler-webpack": "2.0.0-rc.2",
"anywhere": "^1.6.0",
"sass": "^1.70.0",
"sass-loader": "^14.0.0",
diff --git a/package.json b/package.json
index 9a57039b..0fb72656 100644
--- a/package.json
+++ b/package.json
@@ -62,7 +62,7 @@
},
"pnpm": {
"patchedDependencies": {
- "@vuepress/markdown@2.0.0-rc.0": "patches/@vuepress__markdown@2.0.0-rc.0.patch"
+ "@vuepress/markdown@2.0.0-rc.2": "patches/@vuepress__markdown@2.0.0-rc.2.patch"
}
},
"lint-staged": {
diff --git a/patches/@vuepress__markdown@2.0.0-rc.0.patch b/patches/@vuepress__markdown@2.0.0-rc.2.patch
similarity index 83%
rename from patches/@vuepress__markdown@2.0.0-rc.0.patch
rename to patches/@vuepress__markdown@2.0.0-rc.2.patch
index c091b50e..7a5049e1 100644
--- a/patches/@vuepress__markdown@2.0.0-rc.0.patch
+++ b/patches/@vuepress__markdown@2.0.0-rc.2.patch
@@ -1,8 +1,8 @@
diff --git a/dist/index.js b/dist/index.js
-index 996b0d16dac39667cc25496e52adcc9dd2b2befa..a4c9f5ba3a20967d9a561fcc73178d9e84f48279 100644
+index de136bbd25d01677b7b86b6654b780765b9b7cec..b0ff18b8888fe4e691e8c8c2ee3db6ba9fd35ed2 100644
--- a/dist/index.js
+++ b/dist/index.js
-@@ -245,7 +245,7 @@ var codePlugin = (md, {
+@@ -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}`;
diff --git a/plugins/plugin-auto-frontmatter/package.json b/plugins/plugin-auto-frontmatter/package.json
index bde82b0a..bd98b874 100644
--- a/plugins/plugin-auto-frontmatter/package.json
+++ b/plugins/plugin-auto-frontmatter/package.json
@@ -31,10 +31,10 @@
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
"ts": "tsc -b tsconfig.build.json"
},
+ "peerDependencies": {
+ "vuepress": "2.0.0-rc.2"
+ },
"dependencies": {
- "@vuepress/core": "2.0.0-rc.0",
- "@vuepress/shared": "2.0.0-rc.0",
- "@vuepress/utils": "2.0.0-rc.0",
"chokidar": "^3.5.3",
"create-filter": "^1.0.1",
"fast-glob": "^3.3.2",
diff --git a/plugins/plugin-auto-frontmatter/src/node/plugin.ts b/plugins/plugin-auto-frontmatter/src/node/plugin.ts
index 4fdee4ab..b58dc5b6 100644
--- a/plugins/plugin-auto-frontmatter/src/node/plugin.ts
+++ b/plugins/plugin-auto-frontmatter/src/node/plugin.ts
@@ -1,5 +1,5 @@
-import { fs } from '@vuepress/utils'
-import type { Plugin } from '@vuepress/core'
+import { fs } from 'vuepress/utils'
+import type { Plugin } from 'vuepress/core'
import chokidar from 'chokidar'
import { createFilter } from 'create-filter'
import grayMatter from 'gray-matter'
diff --git a/plugins/plugin-auto-frontmatter/src/node/readFiles.ts b/plugins/plugin-auto-frontmatter/src/node/readFiles.ts
index 391c92ab..ed4b2e07 100644
--- a/plugins/plugin-auto-frontmatter/src/node/readFiles.ts
+++ b/plugins/plugin-auto-frontmatter/src/node/readFiles.ts
@@ -1,4 +1,4 @@
-import { fs, path } from '@vuepress/utils'
+import { fs, path } from 'vuepress/utils'
import fg from 'fast-glob'
import type { MarkdownFile } from '../shared/index.js'
diff --git a/plugins/plugin-baidu-tongji/package.json b/plugins/plugin-baidu-tongji/package.json
index 6a2baaa3..f7337b3e 100644
--- a/plugins/plugin-baidu-tongji/package.json
+++ b/plugins/plugin-baidu-tongji/package.json
@@ -31,8 +31,8 @@
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
"ts": "tsc -b tsconfig.build.json"
},
- "dependencies": {
- "@vuepress/core": "2.0.0-rc.0"
+ "peerDependencies": {
+ "vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
diff --git a/plugins/plugin-baidu-tongji/src/node/plugin.ts b/plugins/plugin-baidu-tongji/src/node/plugin.ts
index 80e8eb24..478830fa 100644
--- a/plugins/plugin-baidu-tongji/src/node/plugin.ts
+++ b/plugins/plugin-baidu-tongji/src/node/plugin.ts
@@ -1,4 +1,4 @@
-import type { Plugin } from '@vuepress/core'
+import type { Plugin } from 'vuepress/core'
export interface BaiduTongjiOptions {
key?: string
diff --git a/plugins/plugin-blog-data/package.json b/plugins/plugin-blog-data/package.json
index 4f936dda..2d2627cf 100644
--- a/plugins/plugin-blog-data/package.json
+++ b/plugins/plugin-blog-data/package.json
@@ -35,11 +35,11 @@
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
"ts": "tsc -b tsconfig.build.json"
},
+ "peerDependencies": {
+ "vuepress": "2.0.0-rc.2"
+ },
"dependencies": {
"@vue/devtools-api": "6.5.1",
- "@vuepress/client": "2.0.0-rc.0",
- "@vuepress/core": "2.0.0-rc.0",
- "@vuepress/utils": "2.0.0-rc.0",
"chokidar": "^3.5.3",
"create-filter": "^1.0.1",
"vue": "^3.4.15"
diff --git a/plugins/plugin-blog-data/src/client/config.ts b/plugins/plugin-blog-data/src/client/config.ts
index 53d15727..09d2f231 100644
--- a/plugins/plugin-blog-data/src/client/config.ts
+++ b/plugins/plugin-blog-data/src/client/config.ts
@@ -1,5 +1,6 @@
import { setupDevtoolsPlugin } from '@vue/devtools-api'
-import { defineClientConfig } from '@vuepress/client'
+import { defineClientConfig } from 'vuepress/client'
+import type { ClientConfig } from 'vuepress/client'
import { useBlogPostData } from './composables/index.js'
declare const __VUE_PROD_DEVTOOLS__: boolean
@@ -66,4 +67,4 @@ export default defineClientConfig({
)
}
},
-})
+}) as ClientConfig
diff --git a/plugins/plugin-blog-data/src/node/plugin.ts b/plugins/plugin-blog-data/src/node/plugin.ts
index ab811115..5d6ac8bd 100644
--- a/plugins/plugin-blog-data/src/node/plugin.ts
+++ b/plugins/plugin-blog-data/src/node/plugin.ts
@@ -1,5 +1,5 @@
-import type { Plugin } from '@vuepress/core'
-import { getDirname, path } from '@vuepress/utils'
+import type { Plugin } from 'vuepress/core'
+import { getDirname, path } from 'vuepress/utils'
import chokidar from 'chokidar'
import { createFilter } from 'create-filter'
import { preparedBlogData } from './prepareBlogData.js'
diff --git a/plugins/plugin-blog-data/src/node/prepareBlogData.ts b/plugins/plugin-blog-data/src/node/prepareBlogData.ts
index da91e40e..e712ab69 100644
--- a/plugins/plugin-blog-data/src/node/prepareBlogData.ts
+++ b/plugins/plugin-blog-data/src/node/prepareBlogData.ts
@@ -1,4 +1,4 @@
-import type { App, Page } from '@vuepress/core'
+import type { App, Page } from 'vuepress/core'
import type { BlogPostData, BlogPostDataItem } from '../shared/index.js'
import type { PluginOption } from './plugin.js'
diff --git a/plugins/plugin-blog-data/src/shared/index.ts b/plugins/plugin-blog-data/src/shared/index.ts
index 8ab5f1f9..86af918c 100644
--- a/plugins/plugin-blog-data/src/shared/index.ts
+++ b/plugins/plugin-blog-data/src/shared/index.ts
@@ -1,4 +1,4 @@
-import type { Page } from '@vuepress/core'
+import type { Page } from 'vuepress/core'
export interface BlogDataPluginOptions {
include?: string | string[]
diff --git a/plugins/plugin-blog-data/tsconfig.build.json b/plugins/plugin-blog-data/tsconfig.build.json
index 1c7921a2..3f0244f8 100644
--- a/plugins/plugin-blog-data/tsconfig.build.json
+++ b/plugins/plugin-blog-data/tsconfig.build.json
@@ -6,7 +6,7 @@
"paths": {
"@internal/blogData": ["./src/client/blogPostData.d.ts"]
},
- "types": ["@vuepress/client/types", "vite/client", "webpack-env"],
+ "types": ["vuepress/client-types", "vite/client", "webpack-env"],
"outDir": "./lib"
},
"include": ["./src"]
diff --git a/plugins/plugin-caniuse/package.json b/plugins/plugin-caniuse/package.json
index 45acac29..eb277964 100644
--- a/plugins/plugin-caniuse/package.json
+++ b/plugins/plugin-caniuse/package.json
@@ -41,10 +41,10 @@
"clean": "rimraf lib *.tsbuildinfo",
"ts": "tsc -b tsconfig.build.json"
},
+ "peerDependencies": {
+ "vuepress": "2.0.0-rc.2"
+ },
"dependencies": {
- "@vuepress/client": "2.0.0-rc.0",
- "@vuepress/core": "2.0.0-rc.0",
- "@vuepress/utils": "2.0.0-rc.0",
"markdown-it-container": "^4.0.0"
},
"devDependencies": {
diff --git a/plugins/plugin-caniuse/src/client/clientConfig.ts b/plugins/plugin-caniuse/src/client/clientConfig.ts
index 962fa046..cf788296 100644
--- a/plugins/plugin-caniuse/src/client/clientConfig.ts
+++ b/plugins/plugin-caniuse/src/client/clientConfig.ts
@@ -1,4 +1,5 @@
-import { defineClientConfig } from '@vuepress/client'
+import { defineClientConfig } from 'vuepress/client'
+import type { ClientConfig } from 'vuepress/client'
import type { CanIUseMode } from '../shared/index.js'
import { resolveCanIUse } from './resolveCanIUse.js'
@@ -17,4 +18,4 @@ export default defineClientConfig({
resolveCanIUse()
})
},
-})
+}) as ClientConfig
diff --git a/plugins/plugin-caniuse/src/node/plugin.ts b/plugins/plugin-caniuse/src/node/plugin.ts
index ce9d2f89..55feb3c9 100644
--- a/plugins/plugin-caniuse/src/node/plugin.ts
+++ b/plugins/plugin-caniuse/src/node/plugin.ts
@@ -1,5 +1,5 @@
-import type { Plugin, PluginObject } from '@vuepress/core'
-import { getDirname, path } from '@vuepress/utils'
+import type { Plugin, PluginObject } from 'vuepress/core'
+import { getDirname, path } from 'vuepress/utils'
import type Token from 'markdown-it/lib/token.js'
import container from 'markdown-it-container'
import type { CanIUseMode, CanIUsePluginOptions } from '../shared/index.js'
diff --git a/plugins/plugin-content-update/package.json b/plugins/plugin-content-update/package.json
index 81cba216..3038e78a 100644
--- a/plugins/plugin-content-update/package.json
+++ b/plugins/plugin-content-update/package.json
@@ -35,10 +35,10 @@
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
"ts": "tsc -b tsconfig.build.json"
},
+ "peerDependencies": {
+ "vuepress": "2.0.0-rc.2"
+ },
"dependencies": {
- "@vuepress/client": "2.0.0-rc.0",
- "@vuepress/core": "2.0.0-rc.0",
- "@vuepress/utils": "2.0.0-rc.0",
"vue": "^3.4.15",
"vue-router": "4.2.5"
},
diff --git a/plugins/plugin-content-update/src/client/clientConfig.ts b/plugins/plugin-content-update/src/client/clientConfig.ts
index db419180..bad236a4 100644
--- a/plugins/plugin-content-update/src/client/clientConfig.ts
+++ b/plugins/plugin-content-update/src/client/clientConfig.ts
@@ -1,4 +1,5 @@
-import { defineClientConfig } from '@vuepress/client'
+import { defineClientConfig } from 'vuepress/client'
+import type { ClientConfig } from 'vuepress/client'
import { Content } from './components/Content.js'
export default defineClientConfig({
@@ -8,4 +9,4 @@ export default defineClientConfig({
app.component('Content', Content)
},
-})
+}) as ClientConfig
diff --git a/plugins/plugin-content-update/src/client/components/Content.ts b/plugins/plugin-content-update/src/client/components/Content.ts
index d0659aa8..d02a7987 100644
--- a/plugins/plugin-content-update/src/client/components/Content.ts
+++ b/plugins/plugin-content-update/src/client/components/Content.ts
@@ -1,6 +1,6 @@
import { pagesComponents } from '@internal/pagesComponents'
import { computed, defineComponent, h } from 'vue'
-import { usePageData } from '@vuepress/client'
+import { usePageData } from 'vuepress/client'
import { runCallbacks } from '../composables/index.js'
declare const __VUEPRESS_DEV__: boolean
diff --git a/plugins/plugin-content-update/src/node/plugin.ts b/plugins/plugin-content-update/src/node/plugin.ts
index 02c61177..6d041dee 100644
--- a/plugins/plugin-content-update/src/node/plugin.ts
+++ b/plugins/plugin-content-update/src/node/plugin.ts
@@ -1,5 +1,5 @@
-import type { Plugin } from '@vuepress/core'
-import { getDirname, path } from '@vuepress/utils'
+import type { Plugin } from 'vuepress/core'
+import { getDirname, path } from 'vuepress/utils'
const __dirname = getDirname(import.meta.url)
diff --git a/plugins/plugin-copy-code/package.json b/plugins/plugin-copy-code/package.json
index 9906bd26..68df291b 100644
--- a/plugins/plugin-copy-code/package.json
+++ b/plugins/plugin-copy-code/package.json
@@ -35,12 +35,11 @@
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
"ts": "tsc -b tsconfig.build.json"
},
+ "peerDependencies": {
+ "vuepress": "2.0.0-rc.2"
+ },
"dependencies": {
"@vuepress-plume/plugin-content-update": "workspace:*",
- "@vuepress/client": "2.0.0-rc.0",
- "@vuepress/core": "2.0.0-rc.0",
- "@vuepress/shared": "2.0.0-rc.0",
- "@vuepress/utils": "2.0.0-rc.0",
"vue": "^3.4.15"
},
"publishConfig": {
diff --git a/plugins/plugin-copy-code/src/client/clientConfig.ts b/plugins/plugin-copy-code/src/client/clientConfig.ts
index b0e3727a..3a44ee3f 100644
--- a/plugins/plugin-copy-code/src/client/clientConfig.ts
+++ b/plugins/plugin-copy-code/src/client/clientConfig.ts
@@ -1,4 +1,5 @@
-import { defineClientConfig } from '@vuepress/client'
+import { defineClientConfig } from 'vuepress/client'
+import type { ClientConfig } from 'vuepress/client'
import { setupCopyCode } from './setupCopyCode.js'
import './styles/button.css'
@@ -7,4 +8,4 @@ export default defineClientConfig({
setup() {
setupCopyCode()
},
-})
+}) as ClientConfig
diff --git a/plugins/plugin-copy-code/src/node/plugin.ts b/plugins/plugin-copy-code/src/node/plugin.ts
index 5e1acc1d..1f8bd3fd 100644
--- a/plugins/plugin-copy-code/src/node/plugin.ts
+++ b/plugins/plugin-copy-code/src/node/plugin.ts
@@ -1,5 +1,5 @@
-import type { Plugin } from '@vuepress/core'
-import { getDirname, path } from '@vuepress/utils'
+import type { Plugin } from 'vuepress/core'
+import { getDirname, path } from 'vuepress/utils'
import type { CopyCodeOptions } from '../shared/index.js'
const __dirname = getDirname(import.meta.url)
diff --git a/plugins/plugin-iconify/package.json b/plugins/plugin-iconify/package.json
index b7d59f1a..f808b272 100644
--- a/plugins/plugin-iconify/package.json
+++ b/plugins/plugin-iconify/package.json
@@ -35,12 +35,11 @@
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
"ts": "tsc -b tsconfig.build.json"
},
+ "peerDependencies": {
+ "vuepress": "2.0.0-rc.2"
+ },
"dependencies": {
"@iconify/vue": "^4.1.1",
- "@vuepress/client": "2.0.0-rc.0",
- "@vuepress/core": "2.0.0-rc.0",
- "@vuepress/shared": "2.0.0-rc.0",
- "@vuepress/utils": "2.0.0-rc.0",
"vue": "^3.4.15"
},
"publishConfig": {
diff --git a/plugins/plugin-iconify/src/client/clientConfig.ts b/plugins/plugin-iconify/src/client/clientConfig.ts
index 03483da1..bd9bc0ec 100644
--- a/plugins/plugin-iconify/src/client/clientConfig.ts
+++ b/plugins/plugin-iconify/src/client/clientConfig.ts
@@ -1,4 +1,5 @@
-import { defineClientConfig } from '@vuepress/client'
+import { defineClientConfig } from 'vuepress/client'
+import type { ClientConfig } from 'vuepress/client'
import Iconify from './components/Iconify.vue'
declare const __VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__: string
@@ -7,4 +8,4 @@ export default defineClientConfig({
const name = __VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__ || 'Iconify'
app.component(name, Iconify)
},
-})
+}) as ClientConfig
diff --git a/plugins/plugin-iconify/src/client/components/Iconify.vue b/plugins/plugin-iconify/src/client/components/Iconify.vue
index c57c97c7..977b8dc6 100644
--- a/plugins/plugin-iconify/src/client/components/Iconify.vue
+++ b/plugins/plugin-iconify/src/client/components/Iconify.vue
@@ -1,6 +1,6 @@
-
+
-import { usePageData } from '@vuepress/client'
+import { usePageData } from 'vuepress/client'
import { computed, provide } from 'vue'
import type { PlumeThemePageData } from '../../../shared/index.js'
import { useNav } from '../../composables/nav.js'
diff --git a/theme/src/client/components/Page.vue b/theme/src/client/components/Page.vue
index f9010bcd..a6dbc696 100644
--- a/theme/src/client/components/Page.vue
+++ b/theme/src/client/components/Page.vue
@@ -1,5 +1,5 @@
diff --git a/theme/src/client/components/PageFooter.vue b/theme/src/client/components/PageFooter.vue
index 2d7316a2..e5299a28 100644
--- a/theme/src/client/components/PageFooter.vue
+++ b/theme/src/client/components/PageFooter.vue
@@ -184,6 +184,12 @@ const showFooter = computed(() => {
}
}
+@media print {
+ .prev-next {
+ display: none;
+ }
+}
+
.pager-link {
display: block;
width: 100%;
diff --git a/theme/src/client/components/PageMeta.vue b/theme/src/client/components/PageMeta.vue
index 04dc00db..08648252 100644
--- a/theme/src/client/components/PageMeta.vue
+++ b/theme/src/client/components/PageMeta.vue
@@ -1,5 +1,5 @@