mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
perf: bump vuepress to 2.0.0-rc.2
This commit is contained in:
parent
1beacde121
commit
81870e0c23
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -8,6 +8,9 @@
|
|||||||
"[markdown]": {
|
"[markdown]": {
|
||||||
"files.trimTrailingWhitespace": false
|
"files.trimTrailingWhitespace": false
|
||||||
},
|
},
|
||||||
|
"[typescript]": {
|
||||||
|
"editor.defaultFormatter": "Vue.volar"
|
||||||
|
},
|
||||||
"css.validate": false,
|
"css.validate": false,
|
||||||
"scss.validate": false,
|
"scss.validate": false,
|
||||||
"less.validate": false,
|
"less.validate": false,
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import * as path from 'node:path'
|
import * as path from 'node:path'
|
||||||
import process from 'node:process'
|
import process from 'node:process'
|
||||||
|
import { defineUserConfig } from 'vuepress'
|
||||||
import { viteBundler } from '@vuepress/bundler-vite'
|
import { viteBundler } from '@vuepress/bundler-vite'
|
||||||
import { webpackBundler } from '@vuepress/bundler-webpack'
|
import { webpackBundler } from '@vuepress/bundler-webpack'
|
||||||
import { defineUserConfig } from '@vuepress/cli'
|
|
||||||
import { theme } from './theme.js'
|
import { theme } from './theme.js'
|
||||||
|
|
||||||
export default defineUserConfig({
|
export default defineUserConfig({
|
||||||
@ -14,7 +14,10 @@ export default defineUserConfig({
|
|||||||
'/': { title: 'Plume主题', description: '', lang: 'zh-CN' },
|
'/': { title: 'Plume主题', description: '', lang: 'zh-CN' },
|
||||||
'/en/': { title: 'Plume Theme', description: '', lang: 'en-US' },
|
'/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,
|
theme,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,17 +3,17 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs:build": "vuepress-cli build --clean-cache",
|
"docs:build": "vuepress build --clean-cache",
|
||||||
"docs:clean": "rimraf .vuepress/.temp .vuepress/.cache .vuepress/dist",
|
"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"
|
"docs:serve": "anywhere -s -h localhost -d .vuepress/dist"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/bundler-vite": "2.0.0-rc.0",
|
"@vuepress/bundler-vite": "2.0.0-rc.2",
|
||||||
"@vuepress/bundler-webpack": "2.0.0-rc.0",
|
"@vuepress/bundler-webpack": "2.0.0-rc.2",
|
||||||
"@vuepress/cli": "2.0.0-rc.0",
|
|
||||||
"@vuepress/client": "2.0.0-rc.0",
|
|
||||||
"@vuepress/utils": "2.0.0-rc.0",
|
|
||||||
"anywhere": "^1.6.0",
|
"anywhere": "^1.6.0",
|
||||||
"sass": "^1.70.0",
|
"sass": "^1.70.0",
|
||||||
"sass-loader": "^14.0.0",
|
"sass-loader": "^14.0.0",
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"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": {
|
"lint-staged": {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
diff --git a/dist/index.js b/dist/index.js
|
diff --git a/dist/index.js b/dist/index.js
|
||||||
index 996b0d16dac39667cc25496e52adcc9dd2b2befa..a4c9f5ba3a20967d9a561fcc73178d9e84f48279 100644
|
index de136bbd25d01677b7b86b6654b780765b9b7cec..b0ff18b8888fe4e691e8c8c2ee3db6ba9fd35ed2 100644
|
||||||
--- a/dist/index.js
|
--- a/dist/index.js
|
||||||
+++ b/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 info = token.info ? md.utils.unescapeAll(token.info).trim() : "";
|
||||||
const language = resolveLanguage(info);
|
const language = resolveLanguage(info);
|
||||||
const languageClass = `${options.langPrefix}${language.name}`;
|
const languageClass = `${options.langPrefix}${language.name}`;
|
||||||
@ -31,10 +31,10 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"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",
|
"chokidar": "^3.5.3",
|
||||||
"create-filter": "^1.0.1",
|
"create-filter": "^1.0.1",
|
||||||
"fast-glob": "^3.3.2",
|
"fast-glob": "^3.3.2",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { fs } from '@vuepress/utils'
|
import { fs } from 'vuepress/utils'
|
||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
import chokidar from 'chokidar'
|
import chokidar from 'chokidar'
|
||||||
import { createFilter } from 'create-filter'
|
import { createFilter } from 'create-filter'
|
||||||
import grayMatter from 'gray-matter'
|
import grayMatter from 'gray-matter'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { fs, path } from '@vuepress/utils'
|
import { fs, path } from 'vuepress/utils'
|
||||||
import fg from 'fast-glob'
|
import fg from 'fast-glob'
|
||||||
import type { MarkdownFile } from '../shared/index.js'
|
import type { MarkdownFile } from '../shared/index.js'
|
||||||
|
|
||||||
|
|||||||
@ -31,8 +31,8 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"peerDependencies": {
|
||||||
"@vuepress/core": "2.0.0-rc.0"
|
"vuepress": "2.0.0-rc.2"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
|
|
||||||
export interface BaiduTongjiOptions {
|
export interface BaiduTongjiOptions {
|
||||||
key?: string
|
key?: string
|
||||||
|
|||||||
@ -35,11 +35,11 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-api": "6.5.1",
|
"@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",
|
"chokidar": "^3.5.3",
|
||||||
"create-filter": "^1.0.1",
|
"create-filter": "^1.0.1",
|
||||||
"vue": "^3.4.15"
|
"vue": "^3.4.15"
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { setupDevtoolsPlugin } from '@vue/devtools-api'
|
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'
|
import { useBlogPostData } from './composables/index.js'
|
||||||
|
|
||||||
declare const __VUE_PROD_DEVTOOLS__: boolean
|
declare const __VUE_PROD_DEVTOOLS__: boolean
|
||||||
@ -66,4 +67,4 @@ export default defineClientConfig({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
}) as ClientConfig
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
import { getDirname, path } from '@vuepress/utils'
|
import { getDirname, path } from 'vuepress/utils'
|
||||||
import chokidar from 'chokidar'
|
import chokidar from 'chokidar'
|
||||||
import { createFilter } from 'create-filter'
|
import { createFilter } from 'create-filter'
|
||||||
import { preparedBlogData } from './prepareBlogData.js'
|
import { preparedBlogData } from './prepareBlogData.js'
|
||||||
|
|||||||
@ -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 { BlogPostData, BlogPostDataItem } from '../shared/index.js'
|
||||||
import type { PluginOption } from './plugin.js'
|
import type { PluginOption } from './plugin.js'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { Page } from '@vuepress/core'
|
import type { Page } from 'vuepress/core'
|
||||||
|
|
||||||
export interface BlogDataPluginOptions {
|
export interface BlogDataPluginOptions {
|
||||||
include?: string | string[]
|
include?: string | string[]
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"@internal/blogData": ["./src/client/blogPostData.d.ts"]
|
"@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"
|
"outDir": "./lib"
|
||||||
},
|
},
|
||||||
"include": ["./src"]
|
"include": ["./src"]
|
||||||
|
|||||||
@ -41,10 +41,10 @@
|
|||||||
"clean": "rimraf lib *.tsbuildinfo",
|
"clean": "rimraf lib *.tsbuildinfo",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"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"
|
"markdown-it-container": "^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -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 type { CanIUseMode } from '../shared/index.js'
|
||||||
import { resolveCanIUse } from './resolveCanIUse.js'
|
import { resolveCanIUse } from './resolveCanIUse.js'
|
||||||
|
|
||||||
@ -17,4 +18,4 @@ export default defineClientConfig({
|
|||||||
resolveCanIUse()
|
resolveCanIUse()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
}) as ClientConfig
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { Plugin, PluginObject } from '@vuepress/core'
|
import type { Plugin, PluginObject } from 'vuepress/core'
|
||||||
import { getDirname, path } from '@vuepress/utils'
|
import { getDirname, path } from 'vuepress/utils'
|
||||||
import type Token from 'markdown-it/lib/token.js'
|
import type Token from 'markdown-it/lib/token.js'
|
||||||
import container from 'markdown-it-container'
|
import container from 'markdown-it-container'
|
||||||
import type { CanIUseMode, CanIUsePluginOptions } from '../shared/index.js'
|
import type { CanIUseMode, CanIUsePluginOptions } from '../shared/index.js'
|
||||||
|
|||||||
@ -35,10 +35,10 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"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": "^3.4.15",
|
||||||
"vue-router": "4.2.5"
|
"vue-router": "4.2.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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'
|
import { Content } from './components/Content.js'
|
||||||
|
|
||||||
export default defineClientConfig({
|
export default defineClientConfig({
|
||||||
@ -8,4 +9,4 @@ export default defineClientConfig({
|
|||||||
|
|
||||||
app.component('Content', Content)
|
app.component('Content', Content)
|
||||||
},
|
},
|
||||||
})
|
}) as ClientConfig
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { pagesComponents } from '@internal/pagesComponents'
|
import { pagesComponents } from '@internal/pagesComponents'
|
||||||
import { computed, defineComponent, h } from 'vue'
|
import { computed, defineComponent, h } from 'vue'
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { runCallbacks } from '../composables/index.js'
|
import { runCallbacks } from '../composables/index.js'
|
||||||
|
|
||||||
declare const __VUEPRESS_DEV__: boolean
|
declare const __VUEPRESS_DEV__: boolean
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
import { getDirname, path } from '@vuepress/utils'
|
import { getDirname, path } from 'vuepress/utils'
|
||||||
|
|
||||||
const __dirname = getDirname(import.meta.url)
|
const __dirname = getDirname(import.meta.url)
|
||||||
|
|
||||||
|
|||||||
@ -35,12 +35,11 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress-plume/plugin-content-update": "workspace:*",
|
"@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"
|
"vue": "^3.4.15"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|||||||
@ -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 { setupCopyCode } from './setupCopyCode.js'
|
||||||
|
|
||||||
import './styles/button.css'
|
import './styles/button.css'
|
||||||
@ -7,4 +8,4 @@ export default defineClientConfig({
|
|||||||
setup() {
|
setup() {
|
||||||
setupCopyCode()
|
setupCopyCode()
|
||||||
},
|
},
|
||||||
})
|
}) as ClientConfig
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
import { getDirname, path } from '@vuepress/utils'
|
import { getDirname, path } from 'vuepress/utils'
|
||||||
import type { CopyCodeOptions } from '../shared/index.js'
|
import type { CopyCodeOptions } from '../shared/index.js'
|
||||||
|
|
||||||
const __dirname = getDirname(import.meta.url)
|
const __dirname = getDirname(import.meta.url)
|
||||||
|
|||||||
@ -35,12 +35,11 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify/vue": "^4.1.1",
|
"@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"
|
"vue": "^3.4.15"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|||||||
@ -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'
|
import Iconify from './components/Iconify.vue'
|
||||||
|
|
||||||
declare const __VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__: string
|
declare const __VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__: string
|
||||||
@ -7,4 +8,4 @@ export default defineClientConfig({
|
|||||||
const name = __VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__ || 'Iconify'
|
const name = __VUEPRESS_PLUGIN_ICONIFY_COMPONENT_NAME__ || 'Iconify'
|
||||||
app.component(name, Iconify)
|
app.component(name, Iconify)
|
||||||
},
|
},
|
||||||
})
|
}) as ClientConfig
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Icon as OfflineIcon } from '@iconify/vue/offline'
|
import { Icon as OfflineIcon } from '@iconify/vue/offline'
|
||||||
import { ClientOnly } from '@vuepress/client'
|
import { ClientOnly } from 'vuepress/client'
|
||||||
import type { IconifyRenderMode } from '@iconify/vue'
|
import type { IconifyRenderMode } from '@iconify/vue'
|
||||||
import type { StyleValue } from 'vue'
|
import type { StyleValue } from 'vue'
|
||||||
import { computed, toRefs } from 'vue'
|
import { computed, toRefs } from 'vue'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
import { getDirname, path } from '@vuepress/utils'
|
import { getDirname, path } from 'vuepress/utils'
|
||||||
import type { IconifyOptions } from '../shared/index.js'
|
import type { IconifyOptions } from '../shared/index.js'
|
||||||
|
|
||||||
export function iconifyPlugin({
|
export function iconifyPlugin({
|
||||||
|
|||||||
@ -39,12 +39,12 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
"@netlify/functions": "^2.5.1",
|
"@netlify/functions": "^2.5.1",
|
||||||
"@vuepress/core": "2.0.0-rc.0",
|
|
||||||
"@vuepress/shared": "2.0.0-rc.0",
|
|
||||||
"@vuepress/utils": "2.0.0-rc.0",
|
|
||||||
"chalk": "^5.3.0",
|
"chalk": "^5.3.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"cpx2": "^7.0.1",
|
"cpx2": "^7.0.1",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { App } from '@vuepress/core'
|
import type { App } from 'vuepress/core'
|
||||||
import type { NetlifyFunctionsPluginOptions } from '../shared/index.js'
|
import type { NetlifyFunctionsPluginOptions } from '../shared/index.js'
|
||||||
|
|
||||||
export function extendsBundlerOptions(bundlerOption: any, app: App, options: NetlifyFunctionsPluginOptions, server: string): void {
|
export function extendsBundlerOptions(bundlerOption: any, app: App, options: NetlifyFunctionsPluginOptions, server: string): void {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { App } from '@vuepress/core'
|
import type { App } from 'vuepress/core'
|
||||||
import { path } from '@vuepress/utils'
|
import { path } from 'vuepress/utils'
|
||||||
import * as chokidar from 'chokidar'
|
import * as chokidar from 'chokidar'
|
||||||
import esbuild from 'esbuild'
|
import esbuild from 'esbuild'
|
||||||
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import process from 'node:process'
|
import process from 'node:process'
|
||||||
import type { JsonMap } from '@iarna/toml'
|
import type { JsonMap } from '@iarna/toml'
|
||||||
import { parse, stringify } from '@iarna/toml'
|
import { parse, stringify } from '@iarna/toml'
|
||||||
import type { App } from '@vuepress/core'
|
import type { App } from 'vuepress/core'
|
||||||
import { fs, path } from '@vuepress/utils'
|
import { fs, path } from 'vuepress/utils'
|
||||||
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
||||||
|
|
||||||
export interface NetlifyConfig {
|
export interface NetlifyConfig {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Buffer } from 'node:buffer'
|
import { Buffer } from 'node:buffer'
|
||||||
import process from 'node:process'
|
import process from 'node:process'
|
||||||
import { fs, getDirname, path } from '@vuepress/utils'
|
import { fs, getDirname, path } from 'vuepress/utils'
|
||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
import { execa } from 'execa'
|
import { execa } from 'execa'
|
||||||
import * as portFinder from 'portfinder'
|
import * as portFinder from 'portfinder'
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
* - 如何解决可能存在的 插件之间的 functions 命名冲突
|
* - 如何解决可能存在的 插件之间的 functions 命名冲突
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import type { App, Plugin } from '@vuepress/core'
|
import type { App, Plugin } from 'vuepress/core'
|
||||||
import type {
|
import type {
|
||||||
NetlifyFunctionsOptions,
|
NetlifyFunctionsOptions,
|
||||||
NetlifyFunctionsPluginOptions,
|
NetlifyFunctionsPluginOptions,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { App, PluginObject } from '@vuepress/core'
|
import type { App, PluginObject } from 'vuepress/core'
|
||||||
import { path } from '@vuepress/utils'
|
import { path } from 'vuepress/utils'
|
||||||
import * as cpx2 from 'cpx2'
|
import * as cpx2 from 'cpx2'
|
||||||
import type { UseNetlifyFunctionPluginsOptions } from '../shared/index.js'
|
import type { UseNetlifyFunctionPluginsOptions } from '../shared/index.js'
|
||||||
import { getOptions, netlifyFunctionsPlugin } from './plugin.js'
|
import { getOptions, netlifyFunctionsPlugin } from './plugin.js'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { fs, path } from '@vuepress/utils'
|
import { fs, path } from 'vuepress/utils'
|
||||||
|
|
||||||
export function readFileList(source: string, fileList: string[] = []): string[] {
|
export function readFileList(source: string, fileList: string[] = []): string[] {
|
||||||
if (!fs.existsSync(source))
|
if (!fs.existsSync(source))
|
||||||
|
|||||||
@ -35,12 +35,11 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-api": "6.5.1",
|
"@vue/devtools-api": "6.5.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",
|
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"create-filter": "^1.0.1",
|
"create-filter": "^1.0.1",
|
||||||
"vue": "^3.4.15"
|
"vue": "^3.4.15"
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { setupDevtoolsPlugin } from '@vue/devtools-api'
|
import { setupDevtoolsPlugin } from '@vue/devtools-api'
|
||||||
import { defineClientConfig } from '@vuepress/client'
|
import { defineClientConfig } from 'vuepress/client'
|
||||||
|
import type { ClientConfig } from 'vuepress/client'
|
||||||
import { useNotesData } from './composables/index.js'
|
import { useNotesData } from './composables/index.js'
|
||||||
|
|
||||||
declare const __VUE_PROD_DEVTOOLS__: boolean
|
declare const __VUE_PROD_DEVTOOLS__: boolean
|
||||||
@ -66,4 +67,4 @@ export default defineClientConfig({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
}) as ClientConfig
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { App, Plugin } from '@vuepress/core'
|
import type { App, Plugin } from 'vuepress/core'
|
||||||
import { getDirname, path } from '@vuepress/utils'
|
import { getDirname, path } from 'vuepress/utils'
|
||||||
import type { NotesDataOptions } from '../shared/index.js'
|
import type { NotesDataOptions } from '../shared/index.js'
|
||||||
import { prepareNotesData, watchNotesData } from './prepareNotesData.js'
|
import { prepareNotesData, watchNotesData } from './prepareNotesData.js'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { path } from '@vuepress/utils'
|
import { path } from 'vuepress/utils'
|
||||||
import type { App } from '@vuepress/core'
|
import type { App } from 'vuepress/core'
|
||||||
import * as chokidar from 'chokidar'
|
import * as chokidar from 'chokidar'
|
||||||
import { createFilter } from 'create-filter'
|
import { createFilter } from 'create-filter'
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"@internal/notesData": ["./src/client/notesData.d.ts"]
|
"@internal/notesData": ["./src/client/notesData.d.ts"]
|
||||||
},
|
},
|
||||||
"types": ["@vuepress/client/types", "vite/client", "webpack-env"],
|
"types": ["vuepress/client-types", "vite/client", "webpack-env"],
|
||||||
"outDir": "./lib"
|
"outDir": "./lib"
|
||||||
},
|
},
|
||||||
"include": ["./src"]
|
"include": ["./src"]
|
||||||
|
|||||||
@ -30,12 +30,11 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@netlify/functions": "^2.5.1",
|
"@netlify/functions": "^2.5.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",
|
|
||||||
"leancloud-storage": "^4.15.2",
|
"leancloud-storage": "^4.15.2",
|
||||||
"vue": "^3.4.15",
|
"vue": "^3.4.15",
|
||||||
"vue-router": "4.2.5",
|
"vue-router": "4.2.5",
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { defineClientConfig } from '@vuepress/client'
|
import { defineClientConfig } from 'vuepress/client'
|
||||||
|
import type { ClientConfig } from 'vuepress/client'
|
||||||
import Collection from './components/PageCollection.js'
|
import Collection from './components/PageCollection.js'
|
||||||
|
|
||||||
export default defineClientConfig({
|
export default defineClientConfig({
|
||||||
enhance({ app }) {
|
enhance({ app }) {
|
||||||
app.component('PageCollection', Collection)
|
app.component('PageCollection', Collection)
|
||||||
},
|
},
|
||||||
})
|
}) as ClientConfig
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
// 通过引入 'vuepress-plugin-netlify-functions' 插件,来为本插件提供
|
// 通过引入 'vuepress-plugin-netlify-functions' 插件,来为本插件提供
|
||||||
// netlify functions 开发时支持
|
// netlify functions 开发时支持
|
||||||
import type { App, Plugin } from '@vuepress/core'
|
import type { App, Plugin } from 'vuepress/core'
|
||||||
import { getDirname, path } from '@vuepress/utils'
|
import { getDirname, path } from 'vuepress/utils'
|
||||||
import { useNetlifyFunctionsPlugin } from 'vuepress-plugin-netlify-functions'
|
import { useNetlifyFunctionsPlugin } from 'vuepress-plugin-netlify-functions'
|
||||||
import type { PageCollectionOptions } from '../shared/index.js'
|
import type { PageCollectionOptions } from '../shared/index.js'
|
||||||
|
|
||||||
|
|||||||
@ -31,9 +31,10 @@
|
|||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"ts": "tsc -b tsconfig.build.json"
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/core": "2.0.0-rc.0",
|
|
||||||
"@vuepress/utils": "2.0.0-rc.0",
|
|
||||||
"nanoid": "^5.0.4",
|
"nanoid": "^5.0.4",
|
||||||
"picocolors": "^1.0.0",
|
"picocolors": "^1.0.0",
|
||||||
"shikiji": "^0.10.0",
|
"shikiji": "^0.10.0",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { logger } from '@vuepress/utils'
|
import { logger } from 'vuepress/utils'
|
||||||
import { customAlphabet } from 'nanoid'
|
import { customAlphabet } from 'nanoid'
|
||||||
import c from 'picocolors'
|
import c from 'picocolors'
|
||||||
import type { ShikijiTransformer } from 'shikiji'
|
import type { ShikijiTransformer } from 'shikiji'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
import { highlight } from './highlight.js'
|
import { highlight } from './highlight.js'
|
||||||
import type { HighlighterOptions } from './types'
|
import type { HighlighterOptions } from './types'
|
||||||
|
|
||||||
|
|||||||
2121
pnpm-lock.yaml
generated
2121
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -51,6 +51,9 @@
|
|||||||
"ts": "tsc -b tsconfig.build.json",
|
"ts": "tsc -b tsconfig.build.json",
|
||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vuepress": "2.0.0-rc.2"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pengzhanbo/utils": "^1.1.1",
|
"@pengzhanbo/utils": "^1.1.1",
|
||||||
"@vuepress-plume/plugin-auto-frontmatter": "workspace:*",
|
"@vuepress-plume/plugin-auto-frontmatter": "workspace:*",
|
||||||
@ -62,21 +65,17 @@
|
|||||||
"@vuepress-plume/plugin-iconify": "workspace:*",
|
"@vuepress-plume/plugin-iconify": "workspace:*",
|
||||||
"@vuepress-plume/plugin-notes-data": "workspace:*",
|
"@vuepress-plume/plugin-notes-data": "workspace:*",
|
||||||
"@vuepress-plume/plugin-shikiji": "workspace:*",
|
"@vuepress-plume/plugin-shikiji": "workspace:*",
|
||||||
"@vuepress/client": "2.0.0-rc.0",
|
"@vuepress/plugin-active-header-links": "2.0.0-rc.1",
|
||||||
"@vuepress/core": "2.0.0-rc.0",
|
"@vuepress/plugin-container": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-active-header-links": "2.0.0-rc.0",
|
"@vuepress/plugin-docsearch": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-container": "2.0.0-rc.0",
|
"@vuepress/plugin-external-link-icon": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-docsearch": "2.0.0-rc.0",
|
"@vuepress/plugin-git": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-external-link-icon": "2.0.0-rc.0",
|
"@vuepress/plugin-medium-zoom": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-git": "2.0.0-rc.0",
|
"@vuepress/plugin-nprogress": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-medium-zoom": "2.0.0-rc.0",
|
"@vuepress/plugin-palette": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-nprogress": "2.0.0-rc.0",
|
"@vuepress/plugin-search": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-palette": "2.0.0-rc.0",
|
"@vuepress/plugin-theme-data": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-search": "2.0.0-rc.0",
|
"@vuepress/plugin-toc": "2.0.0-rc.1",
|
||||||
"@vuepress/plugin-theme-data": "2.0.0-rc.0",
|
|
||||||
"@vuepress/plugin-toc": "2.0.0-rc.0",
|
|
||||||
"@vuepress/shared": "2.0.0-rc.0",
|
|
||||||
"@vuepress/utils": "2.0.0-rc.0",
|
|
||||||
"@vueuse/core": "^10.7.2",
|
"@vueuse/core": "^10.7.2",
|
||||||
"date-fns": "^3.3.1",
|
"date-fns": "^3.3.1",
|
||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
@ -84,10 +83,10 @@
|
|||||||
"nanoid": "^5.0.4",
|
"nanoid": "^5.0.4",
|
||||||
"vue": "^3.4.15",
|
"vue": "^3.4.15",
|
||||||
"vue-router": "4.2.5",
|
"vue-router": "4.2.5",
|
||||||
"vuepress-plugin-comment2": "2.0.0-rc.10",
|
"vuepress-plugin-comment2": "2.0.0-rc.14",
|
||||||
"vuepress-plugin-md-enhance": "2.0.0-rc.10",
|
"vuepress-plugin-md-enhance": "2.0.0-rc.14",
|
||||||
"vuepress-plugin-reading-time2": "2.0.0-rc.10",
|
"vuepress-plugin-reading-time2": "2.0.0-rc.14",
|
||||||
"vuepress-plugin-seo2": "2.0.0-rc.10",
|
"vuepress-plugin-seo2": "2.0.0-rc.14",
|
||||||
"vuepress-plugin-sitemap2": "2.0.0-rc.10"
|
"vuepress-plugin-sitemap2": "2.0.0-rc.14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useElementSize, useWindowScroll, useWindowSize } from '@vueuse/core'
|
import { useElementSize, useWindowScroll, useWindowSize } from '@vueuse/core'
|
||||||
import { computed, onMounted, ref, shallowRef, watch } from 'vue'
|
import { computed, onMounted, ref, shallowRef, watch } from 'vue'
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import type { PlumeThemePageData } from '../../shared/index.js'
|
import type { PlumeThemePageData } from '../../shared/index.js'
|
||||||
import IconBackToTop from './icons/IconBackToTop.vue'
|
import IconBackToTop from './icons/IconBackToTop.vue'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import type { PlumeThemePageData } from '../../shared/index.js'
|
import type { PlumeThemePageData } from '../../shared/index.js'
|
||||||
import Archives from './Archives.vue'
|
import Archives from './Archives.vue'
|
||||||
import BlogAside from './BlogAside.vue'
|
import BlogAside from './BlogAside.vue'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PageHeader } from '@vuepress/client'
|
import type { PageHeader } from 'vuepress/client'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
headers: PageHeader[]
|
headers: PageHeader[]
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { isActive } from '../../utils/index.js'
|
import { isActive } from '../../utils/index.js'
|
||||||
import AutoLink from '../AutoLink.vue'
|
import AutoLink from '../AutoLink.vue'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageFrontmatter } from '@vuepress/client'
|
import { usePageFrontmatter } from 'vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type { PlumeThemeFriendsFrontmatter } from '../../shared/index.js'
|
import type { PlumeThemeFriendsFrontmatter } from '../../shared/index.js'
|
||||||
import { useEditNavLink } from '../composables/index.js'
|
import { useEditNavLink } from '../composables/index.js'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageFrontmatter, withBase } from '@vuepress/client'
|
import { usePageFrontmatter, withBase } from 'vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type { PlumeThemeHomeFrontmatter } from '../../shared/index.js'
|
import type { PlumeThemeHomeFrontmatter } from '../../shared/index.js'
|
||||||
import { useDarkMode } from '../composables/darkMode.js'
|
import { useDarkMode } from '../composables/darkMode.js'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { useWindowScroll } from '@vueuse/core'
|
import { useWindowScroll } from '@vueuse/core'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PageHeader } from '@vuepress/client'
|
import type { PageHeader } from 'vuepress/client'
|
||||||
import { onClickOutside } from '@vueuse/core'
|
import { onClickOutside } from '@vueuse/core'
|
||||||
import { nextTick, ref, watch } from 'vue'
|
import { nextTick, ref, watch } from 'vue'
|
||||||
import { useThemeLocaleData } from '../composables/index.js'
|
import { useThemeLocaleData } from '../composables/index.js'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageFrontmatter } from '@vuepress/client'
|
import { usePageFrontmatter } from 'vuepress/client'
|
||||||
import { useWindowScroll } from '@vueuse/core'
|
import { useWindowScroll } from '@vueuse/core'
|
||||||
import { ref, watchPostEffect } from 'vue'
|
import { ref, watchPostEffect } from 'vue'
|
||||||
import { useSidebar } from '../../composables/sidebar.js'
|
import { useSidebar } from '../../composables/sidebar.js'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type { NavItem, NavItemWithChildren } from '../../../shared/index.js'
|
import type { NavItem, NavItemWithChildren } from '../../../shared/index.js'
|
||||||
import { isActive } from '../../utils/index.js'
|
import { isActive } from '../../utils/index.js'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import type { NavItemWithLink } from '../../../shared/index.js'
|
import type { NavItemWithLink } from '../../../shared/index.js'
|
||||||
import { isActive } from '../../utils/index.js'
|
import { isActive } from '../../utils/index.js'
|
||||||
import AutoLink from '../AutoLink.vue'
|
import AutoLink from '../AutoLink.vue'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSiteLocaleData, withBase } from '@vuepress/client'
|
import { useRouteLocale, useSiteLocaleData, withBase } from 'vuepress/client'
|
||||||
import { useSidebar } from '../../composables/index.js'
|
import { useSidebar } from '../../composables/index.js'
|
||||||
import { useThemeLocaleData } from '../../composables/themeData.js'
|
import { useThemeLocaleData } from '../../composables/themeData.js'
|
||||||
import AutoLink from '../AutoLink.vue'
|
import AutoLink from '../AutoLink.vue'
|
||||||
@ -8,11 +8,12 @@ import VImage from '../VImage.vue'
|
|||||||
const theme = useThemeLocaleData()
|
const theme = useThemeLocaleData()
|
||||||
const site = useSiteLocaleData()
|
const site = useSiteLocaleData()
|
||||||
const { hasSidebar } = useSidebar()
|
const { hasSidebar } = useSidebar()
|
||||||
|
const routeLocale = useRouteLocale()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="navbar-title" :class="{ 'has-sidebar': hasSidebar }">
|
<div class="navbar-title" :class="{ 'has-sidebar': hasSidebar }">
|
||||||
<AutoLink class="title" :href="theme.home || withBase('/')">
|
<AutoLink class="title" :href="theme.home ?? withBase(routeLocale)">
|
||||||
<VImage
|
<VImage
|
||||||
v-if="theme.logo"
|
v-if="theme.logo"
|
||||||
class="logo"
|
class="logo"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { computed, provide } from 'vue'
|
import { computed, provide } from 'vue'
|
||||||
import type { PlumeThemePageData } from '../../../shared/index.js'
|
import type { PlumeThemePageData } from '../../../shared/index.js'
|
||||||
import { useNav } from '../../composables/nav.js'
|
import { useNav } from '../../composables/nav.js'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useMediumZoom } from '@vuepress/plugin-medium-zoom/client'
|
import { useMediumZoom } from '@vuepress/plugin-medium-zoom/client'
|
||||||
import { onContentUpdated } from '@vuepress-plume/plugin-content-update/client'
|
import { onContentUpdated } from '@vuepress-plume/plugin-content-update/client'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { onContentUpdated } from '@vuepress-plume/plugin-content-update/client'
|
import { onContentUpdated } from '@vuepress-plume/plugin-content-update/client'
|
||||||
import { useActiveAnchor, useThemeLocaleData } from '../composables/index.js'
|
import { useActiveAnchor, useThemeLocaleData } from '../composables/index.js'
|
||||||
@ -21,14 +21,6 @@ const marker = ref()
|
|||||||
|
|
||||||
useActiveAnchor(container, marker)
|
useActiveAnchor(container, marker)
|
||||||
|
|
||||||
function handleClick({ target: el }: Event) {
|
|
||||||
const id = `#${(el as HTMLAnchorElement).href!.split('#')[1]}`
|
|
||||||
const heading = document.querySelector<HTMLAnchorElement>(
|
|
||||||
decodeURIComponent(id),
|
|
||||||
)
|
|
||||||
heading?.focus()
|
|
||||||
}
|
|
||||||
|
|
||||||
function handlePrint() {
|
function handlePrint() {
|
||||||
window.print()
|
window.print()
|
||||||
}
|
}
|
||||||
@ -56,7 +48,6 @@ function handlePrint() {
|
|||||||
<PageAsideItem
|
<PageAsideItem
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
:root="true"
|
:root="true"
|
||||||
:on-click="handleClick"
|
|
||||||
/>
|
/>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,19 +1,26 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PageHeader } from '@vuepress/client'
|
import type { PageHeader } from 'vuepress/client'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
headers: PageHeader[]
|
headers: PageHeader[]
|
||||||
onClick: (e: MouseEvent) => void
|
|
||||||
root?: boolean
|
root?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
function handleClick({ target: el }: Event) {
|
||||||
|
const id = `#${(el as HTMLAnchorElement).href!.split('#')[1]}`
|
||||||
|
const heading = document.querySelector<HTMLAnchorElement>(
|
||||||
|
decodeURIComponent(id),
|
||||||
|
)
|
||||||
|
heading?.focus({ preventScroll: true })
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ul :class="root ? 'root' : 'nested'">
|
<ul :class="root ? 'root' : 'nested'">
|
||||||
<li v-for="{ children, link, title } in headers" :key="link">
|
<li v-for="{ children, link, title } in headers" :key="link">
|
||||||
<a class="outline-link" :href="link" @click="onClick">{{ title }}</a>
|
<a class="outline-link" :href="link" @click="handleClick">{{ title }}</a>
|
||||||
<template v-if="children?.length">
|
<template v-if="children?.length">
|
||||||
<PageAsideItem :headers="children" :on-click="onClick" />
|
<PageAsideItem :headers="children" />
|
||||||
</template>
|
</template>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -184,6 +184,12 @@ const showFooter = computed(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.prev-next {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.pager-link {
|
.pager-link {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePageData, usePageFrontmatter } from '@vuepress/client'
|
import { usePageData, usePageFrontmatter } from 'vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type {
|
import type {
|
||||||
PlumeThemePageData,
|
PlumeThemePageData,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { withBase } from '@vuepress/client'
|
import { withBase } from 'vuepress/client'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
image:
|
image:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { usePageLang } from '@vuepress/client'
|
import { usePageLang } from 'vuepress/client'
|
||||||
import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client'
|
import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type { PlumeThemeBlogPostItem } from '../../shared/index.js'
|
import type { PlumeThemeBlogPostItem } from '../../shared/index.js'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { usePageData, useRouteLocale } from '@vuepress/client'
|
import { usePageData, useRouteLocale } from 'vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type { PlumeThemePageData } from '../../shared/index.js'
|
import type { PlumeThemePageData } from '../../shared/index.js'
|
||||||
import { ensureStartingSlash } from '../utils/index.js'
|
import { ensureStartingSlash } from '../utils/index.js'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { useRouteLocale } from '@vuepress/client'
|
import { useRouteLocale } from 'vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { normalizeLink } from '../utils'
|
import { normalizeLink } from '../utils'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { usePageData, usePageFrontmatter, usePageLang } from '@vuepress/client'
|
import { usePageData, usePageFrontmatter, usePageLang } from 'vuepress/client'
|
||||||
import { isArray, isPlainObject, isString } from '@vuepress/shared'
|
import { isPlainObject, isString } from 'vuepress/shared'
|
||||||
import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client'
|
import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client'
|
||||||
import type { NotesSidebarItem } from '@vuepress-plume/plugin-notes-data'
|
import type { NotesSidebarItem } from '@vuepress-plume/plugin-notes-data'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
@ -115,7 +115,7 @@ function flatSidebar(sidebar: NotesSidebarItem[], res: NavItemWithLink[] = []):
|
|||||||
if (item.link)
|
if (item.link)
|
||||||
res.push({ link: item.link, text: item.text || item.dir || '' })
|
res.push({ link: item.link, text: item.text || item.dir || '' })
|
||||||
|
|
||||||
if (isArray(item.items) && item.items.length)
|
if (Array.isArray(item.items) && item.items.length)
|
||||||
flatSidebar(item.items as NotesSidebarItem[], res)
|
flatSidebar(item.items as NotesSidebarItem[], res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type {
|
import type {
|
||||||
PlumeThemePageData,
|
PlumeThemePageData,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { PageData } from '@vuepress/client'
|
import type { PageData } from 'vuepress/client'
|
||||||
import { usePageData, usePageFrontmatter, withBase } from '@vuepress/client'
|
import { usePageData, usePageFrontmatter, withBase } from 'vuepress/client'
|
||||||
import type {
|
import type {
|
||||||
NotesData,
|
NotesData,
|
||||||
NotesSidebarItem,
|
NotesSidebarItem,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { isFunction, isString } from '@vuepress/shared'
|
import { isFunction, isString } from 'vuepress/shared'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import type { Router } from 'vue-router'
|
import type { Router } from 'vue-router'
|
||||||
import type { NavItemWithLink } from '../../shared/index.js'
|
import type { NavItemWithLink } from '../../shared/index.js'
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import './styles/index.scss'
|
import './styles/index.scss'
|
||||||
|
|
||||||
import { defineClientConfig } from '@vuepress/client'
|
import { defineClientConfig } from 'vuepress/client'
|
||||||
|
import type { ClientConfig } from 'vuepress/client'
|
||||||
import { h } from 'vue'
|
import { h } from 'vue'
|
||||||
import Badge from './components/global/Badge.vue'
|
import Badge from './components/global/Badge.vue'
|
||||||
import ExternalLinkIcon from './components/global/ExternalLinkIcon.vue'
|
import ExternalLinkIcon from './components/global/ExternalLinkIcon.vue'
|
||||||
@ -56,4 +57,4 @@ export default defineClientConfig({
|
|||||||
Layout,
|
Layout,
|
||||||
NotFound,
|
NotFound,
|
||||||
},
|
},
|
||||||
})
|
}) as ClientConfig
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from 'vuepress/client'
|
||||||
import { computed, provide, watch } from 'vue'
|
import { computed, provide, watch } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import type { PlumeThemePageData } from '../../shared/index.js'
|
import type { PlumeThemePageData } from '../../shared/index.js'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRouteLocale, withBase } from '@vuepress/client'
|
import { useRouteLocale, withBase } from 'vuepress/client'
|
||||||
import LayoutContent from '../components/LayoutContent.vue'
|
import LayoutContent from '../components/LayoutContent.vue'
|
||||||
import Nav from '../components/Nav/index.vue'
|
import Nav from '../components/Nav/index.vue'
|
||||||
import { useThemeLocaleData } from '../composables'
|
import { useThemeLocaleData } from '../composables'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { withBase } from '@vuepress/client'
|
import { withBase } from 'vuepress/client'
|
||||||
import { PATHNAME_PROTOCOL_RE, isExternal } from './shared.js'
|
import { PATHNAME_PROTOCOL_RE, isExternal } from './shared.js'
|
||||||
|
|
||||||
export function normalizeLink(url: string): string {
|
export function normalizeLink(url: string): string {
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import {
|
|||||||
isLinkHttp,
|
isLinkHttp,
|
||||||
removeEndingSlash,
|
removeEndingSlash,
|
||||||
removeLeadingSlash,
|
removeLeadingSlash,
|
||||||
} from '@vuepress/shared'
|
} from 'vuepress/shared'
|
||||||
import { resolveRepoType } from './resolveRepoType.js'
|
import { resolveRepoType } from './resolveRepoType.js'
|
||||||
import type { RepoType } from './resolveRepoType.js'
|
import type { RepoType } from './resolveRepoType.js'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { isLinkHttp } from '@vuepress/shared'
|
import { isLinkHttp } from 'vuepress/shared'
|
||||||
|
|
||||||
export type RepoType = 'GitHub' | 'GitLab' | 'Gitee' | 'Bitbucket' | null
|
export type RepoType = 'GitHub' | 'GitLab' | 'Gitee' | 'Bitbucket' | null
|
||||||
|
|
||||||
|
|||||||
@ -13,10 +13,12 @@ export const icons = {
|
|||||||
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>LinkedIn</title><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>',
|
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>LinkedIn</title><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>',
|
||||||
mastodon:
|
mastodon:
|
||||||
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Mastodon</title><path d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z"/></svg>',
|
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Mastodon</title><path d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z"/></svg>',
|
||||||
|
npm: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>npm</title><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg>',
|
||||||
slack:
|
slack:
|
||||||
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Slack</title><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"/></svg>',
|
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Slack</title><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"/></svg>',
|
||||||
twitter:
|
twitter:
|
||||||
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitter</title><path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"/></svg>',
|
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitter</title><path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"/></svg>',
|
||||||
|
x: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>X</title><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg>',
|
||||||
youtube:
|
youtube:
|
||||||
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>YouTube</title><path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg>',
|
'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>YouTube</title><path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg>',
|
||||||
qq: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>QQ</title><g fill="none" fill-rule="evenodd"><path d="M24 0v24H0V0h24ZM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018Zm.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022Zm-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01l-.184-.092Z"/><path fill="currentColor" d="M5.567 10.592c.075-.883.108-1.77.157-2.655a6.286 6.286 0 0 1 12.552 0c.05.91.09 1.818.184 2.724c.194.417.385.858.57 1.316c1.242 3.073 1.73 5.773 1.09 6.032c-.336.135-.914-.425-1.566-1.431a5.2 5.2 0 0 1-.067.322a6.696 6.696 0 0 1-1.899 3.27c1.028.35 1.912.827 1.912 1.33c0 .509-2.48.503-4.238.5c-.549-.002-1.012-.008-1.382-.058a6.73 6.73 0 0 1-1.76 0c-.37.05-.832.056-1.382.057c-1.758.004-4.238.01-4.238-.499c0-.503.884-.98 1.912-1.33a6.695 6.695 0 0 1-1.899-3.27a6.79 6.79 0 0 1-.077-.316c-.65 1.002-1.227 1.56-1.561 1.425c-.64-.259-.153-2.96 1.089-6.032c.195-.483.398-.948.603-1.385ZM7.72 8.048a4.286 4.286 0 0 1 8.558 0L16.443 11h.002c0 1.079.526 1.973.992 2.905c-.386.138-.803.536-.769 1.15A4.682 4.682 0 0 1 12 20c-2.682 0-4.817-2.262-4.668-4.944c.033-.602-.375-1-.745-1.142c-.047-.018.969-1.903.969-2.914h.001l.164-2.952Z"/></g></svg>',
|
qq: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>QQ</title><g fill="none" fill-rule="evenodd"><path d="M24 0v24H0V0h24ZM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018Zm.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022Zm-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01l-.184-.092Z"/><path fill="currentColor" d="M5.567 10.592c.075-.883.108-1.77.157-2.655a6.286 6.286 0 0 1 12.552 0c.05.91.09 1.818.184 2.724c.194.417.385.858.57 1.316c1.242 3.073 1.73 5.773 1.09 6.032c-.336.135-.914-.425-1.566-1.431a5.2 5.2 0 0 1-.067.322a6.696 6.696 0 0 1-1.899 3.27c1.028.35 1.912.827 1.912 1.33c0 .509-2.48.503-4.238.5c-.549-.002-1.012-.008-1.382-.058a6.73 6.73 0 0 1-1.76 0c-.37.05-.832.056-1.382.057c-1.758.004-4.238.01-4.238-.499c0-.503.884-.98 1.912-1.33a6.695 6.695 0 0 1-1.899-3.27a6.79 6.79 0 0 1-.077-.316c-.65 1.002-1.227 1.56-1.561 1.425c-.64-.259-.153-2.96 1.089-6.032c.195-.483.398-.948.603-1.385ZM7.72 8.048a4.286 4.286 0 0 1 8.558 0L16.443 11h.002c0 1.079.526 1.973.992 2.905c-.386.138-.803.536-.769 1.15A4.682 4.682 0 0 1 12 20c-2.682 0-4.817-2.262-4.668-4.944c.033-.602-.375-1-.745-1.142c-.047-.018.969-1.903.969-2.914h.001l.164-2.952Z"/></g></svg>',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { path } from '@vuepress/utils'
|
import { path } from 'vuepress/utils'
|
||||||
import type { App } from '@vuepress/core'
|
import type { App } from 'vuepress/core'
|
||||||
import { resolveLocalePath } from '@vuepress/shared'
|
import { resolveLocalePath } from 'vuepress/shared'
|
||||||
import type {
|
import type {
|
||||||
AutoFrontmatterOptions,
|
AutoFrontmatterOptions,
|
||||||
FrontmatterArray,
|
FrontmatterArray,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import containerPlugin from '@vuepress/plugin-container'
|
import containerPlugin from '@vuepress/plugin-container'
|
||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from 'vuepress/core'
|
||||||
|
|
||||||
export const customContainers: Plugin[] = [
|
export const customContainers: Plugin[] = [
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { App } from '@vuepress/core'
|
import type { App } from 'vuepress/core'
|
||||||
import { deepClone, deepMerge } from '@pengzhanbo/utils'
|
import { deepClone, deepMerge } from '@pengzhanbo/utils'
|
||||||
import type { PlumeThemeLocaleOptions } from '../shared/index.js'
|
import type { PlumeThemeLocaleOptions } from '../shared/index.js'
|
||||||
import { pathJoin } from './utils.js'
|
import { pathJoin } from './utils.js'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { App, PluginConfig } from '@vuepress/core'
|
import type { App, PluginConfig } from 'vuepress/core'
|
||||||
import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'
|
import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'
|
||||||
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
|
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
|
||||||
import { externalLinkIconPlugin } from '@vuepress/plugin-external-link-icon'
|
import { externalLinkIconPlugin } from '@vuepress/plugin-external-link-icon'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { isEmptyObject } from '@pengzhanbo/utils'
|
import { isEmptyObject } from '@pengzhanbo/utils'
|
||||||
import type { App } from '@vuepress/core'
|
import type { App } from 'vuepress/core'
|
||||||
import type { PlumeThemeLocaleOptions } from '../shared/index.js'
|
import type { PlumeThemeLocaleOptions } from '../shared/index.js'
|
||||||
import { normalizePath } from './utils.js'
|
import { normalizePath } from './utils.js'
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import type { DocsearchPluginOptions } from '@vuepress/plugin-docsearch'
|
import type { DocsearchPluginOptions } from '@vuepress/plugin-docsearch'
|
||||||
import type { SearchPluginOptions } from '@vuepress/plugin-search'
|
import type { SearchPluginOptions } from '@vuepress/plugin-search'
|
||||||
import type { App } from '@vuepress/core'
|
import type { App } from 'vuepress/core'
|
||||||
import { deepMerge } from '@pengzhanbo/utils'
|
import { deepMerge } from '@pengzhanbo/utils'
|
||||||
import { resolvedAppLocales } from './resolveLocaleOptions.js'
|
import { resolvedAppLocales } from './resolveLocaleOptions.js'
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { path } from '@vuepress/utils'
|
import { path } from 'vuepress/utils'
|
||||||
import type { App, Page } from '@vuepress/core'
|
import type { App, Page } from 'vuepress/core'
|
||||||
import { createPage } from '@vuepress/core'
|
import { createPage } from 'vuepress/core'
|
||||||
import type {
|
import type {
|
||||||
PageCategoryData,
|
PageCategoryData,
|
||||||
PlumeThemeLocaleOptions,
|
PlumeThemeLocaleOptions,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { Page, Theme } from '@vuepress/core'
|
import type { Page, Theme } from 'vuepress/core'
|
||||||
import { templateRenderer } from '@vuepress/utils'
|
import { templateRenderer } from 'vuepress/utils'
|
||||||
import type { PlumeThemeOptions, PlumeThemePageData } from '../shared/index.js'
|
import type { PlumeThemeOptions, PlumeThemePageData } from '../shared/index.js'
|
||||||
import { mergeLocaleOptions } from './defaultOptions.js'
|
import { mergeLocaleOptions } from './defaultOptions.js'
|
||||||
import { setupPlugins } from './plugins.js'
|
import { setupPlugins } from './plugins.js'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import process from 'node:process'
|
import process from 'node:process'
|
||||||
import { customAlphabet } from 'nanoid'
|
import { customAlphabet } from 'nanoid'
|
||||||
import { fs, getDirname, path } from '@vuepress/utils'
|
import { fs, getDirname, path } from 'vuepress/utils'
|
||||||
|
|
||||||
const __dirname = getDirname(import.meta.url)
|
const __dirname = getDirname(import.meta.url)
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { LocaleData } from '@vuepress/core'
|
import type { LocaleData } from 'vuepress/core'
|
||||||
import type { NotesDataOptions } from '@vuepress-plume/plugin-notes-data'
|
import type { NotesDataOptions } from '@vuepress-plume/plugin-notes-data'
|
||||||
import type { NavItem } from './navbar.js'
|
import type { NavItem } from './navbar.js'
|
||||||
|
|
||||||
@ -29,8 +29,10 @@ export type SocialLinkIcon =
|
|||||||
| 'instagram'
|
| 'instagram'
|
||||||
| 'linkedin'
|
| 'linkedin'
|
||||||
| 'mastodon'
|
| 'mastodon'
|
||||||
|
| 'npm'
|
||||||
| 'slack'
|
| 'slack'
|
||||||
| 'twitter'
|
| 'twitter'
|
||||||
|
| 'x'
|
||||||
| 'youtube'
|
| 'youtube'
|
||||||
| 'qq'
|
| 'qq'
|
||||||
| 'weibo'
|
| 'weibo'
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"types": ["@vuepress/client/types", "vite/client"],
|
"types": ["vuepress/client-types", "vite/client"],
|
||||||
"outDir": "./lib"
|
"outDir": "./lib"
|
||||||
},
|
},
|
||||||
"files": [],
|
"files": [],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user