Merge pull request #45 from pengzhanbo/RC-29
upgrade vuepress to `2.0.0-rc.2`
This commit is contained in:
commit
206c9357cb
@ -1,4 +1 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx commitlint --edit $1
|
||||
|
||||
@ -1,4 +1 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
|
||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -8,6 +8,9 @@
|
||||
"[markdown]": {
|
||||
"files.trimTrailingWhitespace": false
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "Vue.volar"
|
||||
},
|
||||
"css.validate": false,
|
||||
"scss.validate": false,
|
||||
"less.validate": false,
|
||||
|
||||
@ -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,
|
||||
})
|
||||
|
||||
@ -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",
|
||||
|
||||
12
package.json
12
package.json
@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"version": "1.0.0-rc.28",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@8.14.1",
|
||||
"packageManager": "pnpm@8.14.3",
|
||||
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@ -30,7 +30,7 @@
|
||||
"commit": "cz",
|
||||
"lint": "eslint .",
|
||||
"lint:css": "stylelint **/*.{css,scss,vue}",
|
||||
"prepare": "husky install",
|
||||
"prepare": "husky",
|
||||
"release": "pnpm release:check && pnpm release:version && pnpm release:publish",
|
||||
"release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||
"release:check": "pnpm lint && pnpm lint:css && pnpm build",
|
||||
@ -38,8 +38,8 @@
|
||||
"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": "^18.4.4",
|
||||
"@commitlint/config-conventional": "^18.4.4",
|
||||
"@commitlint/cli": "^18.6.0",
|
||||
"@commitlint/config-conventional": "^18.6.0",
|
||||
"@pengzhanbo/eslint-config-vue": "^1.5.4",
|
||||
"@pengzhanbo/stylelint-config": "^1.5.4",
|
||||
"@types/lodash.merge": "^4.6.9",
|
||||
@ -52,7 +52,7 @@
|
||||
"cpx2": "^7.0.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"eslint": "^8.56.0",
|
||||
"husky": "^8.0.3",
|
||||
"husky": "^9.0.6",
|
||||
"lint-staged": "^15.2.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"stylelint": "^16.2.0",
|
||||
@ -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": {
|
||||
|
||||
@ -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}`;
|
||||
@ -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",
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { Plugin } from '@vuepress/core'
|
||||
import type { Plugin } from 'vuepress/core'
|
||||
|
||||
export interface BaiduTongjiOptions {
|
||||
key?: string
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { Page } from '@vuepress/core'
|
||||
import type { Page } from 'vuepress/core'
|
||||
|
||||
export interface BlogDataPluginOptions {
|
||||
include?: string | string[]
|
||||
|
||||
@ -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"]
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.0.0-beta.8](https://github.com/pengzhanbo/vuepress-theme-plume/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2022-04-06)
|
||||
|
||||
**Note:** Version bump only for package @vuepress-plume/vuepress-plugin-caniuse
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.0.0-beta.6](https://github.com/pengzhanbo/vuepress-theme-plume/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @vuepress-plume/vuepress-plugin-caniuse
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.0.0-beta.5](https://github.com/pengzhanbo/vuepress-theme-plume/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @vuepress-plume/vuepress-plugin-caniuse
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.0.0-beta.4](https://github.com/pengzhanbo/vuepress-theme-plume/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @vuepress-plume/vuepress-plugin-caniuse
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.0.0-beta.3](https://github.com/pengzhanbo/vuepress-theme-plume/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @vuepress-plume/vuepress-plugin-caniuse
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.0.0-beta.2](https://github.com/pengzhanbo/vuepress-theme-plume/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @vuepress-plume/vuepress-plugin-caniuse
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 1.0.0-beta.1 (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @vuepress-plume/vuepress-plugin-caniuse
|
||||
@ -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": {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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"
|
||||
},
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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": {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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": {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
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 { StyleValue } from 'vue'
|
||||
import { computed, toRefs } from 'vue'
|
||||
|
||||
@ -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 { IconifyOptions } from '../shared/index.js'
|
||||
|
||||
export function iconifyPlugin({
|
||||
|
||||
@ -39,23 +39,23 @@
|
||||
"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": {
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"@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",
|
||||
"chokidar": "^3.5.3",
|
||||
"cpx2": "^7.0.1",
|
||||
"dotenv": "^16.3.2",
|
||||
"esbuild": "^0.19.11",
|
||||
"dotenv": "^16.4.1",
|
||||
"esbuild": "^0.19.12",
|
||||
"execa": "^8.0.1",
|
||||
"netlify-cli": "^17.15.1",
|
||||
"netlify-cli": "^17.15.3",
|
||||
"portfinder": "^1.0.32"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.11.5"
|
||||
"@types/node": "^20.11.7"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { App } from '@vuepress/core'
|
||||
import type { App } from 'vuepress/core'
|
||||
import type { NetlifyFunctionsPluginOptions } from '../shared/index.js'
|
||||
|
||||
export function extendsBundlerOptions(bundlerOption: any, app: App, options: NetlifyFunctionsPluginOptions, server: string): void {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { App } from '@vuepress/core'
|
||||
import { path } from '@vuepress/utils'
|
||||
import type { App } from 'vuepress/core'
|
||||
import { path } from 'vuepress/utils'
|
||||
import * as chokidar from 'chokidar'
|
||||
import esbuild from 'esbuild'
|
||||
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import process from 'node:process'
|
||||
import type { JsonMap } from '@iarna/toml'
|
||||
import { parse, stringify } from '@iarna/toml'
|
||||
import type { App } from '@vuepress/core'
|
||||
import { fs, path } from '@vuepress/utils'
|
||||
import type { App } from 'vuepress/core'
|
||||
import { fs, path } from 'vuepress/utils'
|
||||
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
||||
|
||||
export interface NetlifyConfig {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Buffer } from 'node:buffer'
|
||||
import process from 'node:process'
|
||||
import { fs, getDirname, path } from '@vuepress/utils'
|
||||
import { fs, getDirname, path } from 'vuepress/utils'
|
||||
import dotenv from 'dotenv'
|
||||
import { execa } from 'execa'
|
||||
import * as portFinder from 'portfinder'
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* - 如何解决可能存在的 插件之间的 functions 命名冲突
|
||||
*
|
||||
*/
|
||||
import type { App, Plugin } from '@vuepress/core'
|
||||
import type { App, Plugin } from 'vuepress/core'
|
||||
import type {
|
||||
NetlifyFunctionsOptions,
|
||||
NetlifyFunctionsPluginOptions,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { App, PluginObject } from '@vuepress/core'
|
||||
import { path } from '@vuepress/utils'
|
||||
import type { App, PluginObject } from 'vuepress/core'
|
||||
import { path } from 'vuepress/utils'
|
||||
import * as cpx2 from 'cpx2'
|
||||
import type { UseNetlifyFunctionPluginsOptions } from '../shared/index.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[] {
|
||||
if (!fs.existsSync(source))
|
||||
|
||||
@ -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": {
|
||||
"@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",
|
||||
"create-filter": "^1.0.1",
|
||||
"vue": "^3.4.15"
|
||||
|
||||
@ -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 { useNotesData } from './composables/index.js'
|
||||
|
||||
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 { getDirname, path } from '@vuepress/utils'
|
||||
import type { App, Plugin } from 'vuepress/core'
|
||||
import { getDirname, path } from 'vuepress/utils'
|
||||
import type { NotesDataOptions } from '../shared/index.js'
|
||||
import { prepareNotesData, watchNotesData } from './prepareNotesData.js'
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { path } from '@vuepress/utils'
|
||||
import type { App } from '@vuepress/core'
|
||||
import { path } from 'vuepress/utils'
|
||||
import type { App } from 'vuepress/core'
|
||||
import * as chokidar from 'chokidar'
|
||||
import { createFilter } from 'create-filter'
|
||||
import type {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"paths": {
|
||||
"@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"
|
||||
},
|
||||
"include": ["./src"]
|
||||
|
||||
@ -30,12 +30,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": {
|
||||
"@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",
|
||||
"vue": "^3.4.15",
|
||||
"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'
|
||||
|
||||
export default defineClientConfig({
|
||||
enhance({ app }) {
|
||||
app.component('PageCollection', Collection)
|
||||
},
|
||||
})
|
||||
}) as ClientConfig
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
|
||||
// 通过引入 'vuepress-plugin-netlify-functions' 插件,来为本插件提供
|
||||
// netlify functions 开发时支持
|
||||
import type { App, Plugin } from '@vuepress/core'
|
||||
import { getDirname, path } from '@vuepress/utils'
|
||||
import type { App, Plugin } from 'vuepress/core'
|
||||
import { getDirname, path } from 'vuepress/utils'
|
||||
import { useNetlifyFunctionsPlugin } from 'vuepress-plugin-netlify-functions'
|
||||
import type { PageCollectionOptions } from '../shared/index.js'
|
||||
|
||||
|
||||
@ -31,14 +31,15 @@
|
||||
"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/utils": "2.0.0-rc.0",
|
||||
"nanoid": "^5.0.4",
|
||||
"picocolors": "^1.0.0",
|
||||
"shikiji": "^0.9.19",
|
||||
"shikiji-transformers": "^0.9.19",
|
||||
"shikiji-twoslash": "^0.9.19"
|
||||
"shikiji": "^0.10.2",
|
||||
"shikiji-transformers": "^0.10.2",
|
||||
"shikiji-twoslash": "^0.10.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { logger } from '@vuepress/utils'
|
||||
import { logger } from 'vuepress/utils'
|
||||
import { customAlphabet } from 'nanoid'
|
||||
import c from 'picocolors'
|
||||
import type { ShikijiTransformer } from 'shikiji'
|
||||
@ -15,7 +15,7 @@ import {
|
||||
transformerNotationFocus,
|
||||
transformerNotationHighlight,
|
||||
} from 'shikiji-transformers'
|
||||
import { rendererRich, transformerTwoSlash } from 'shikiji-twoslash'
|
||||
import { rendererRich, transformerTwoslash } from 'shikiji-twoslash'
|
||||
import type { HighlighterOptions, ThemeOptions } from './types.js'
|
||||
import { resolveAttrs } from './resolveAttrs.js'
|
||||
|
||||
@ -151,7 +151,7 @@ export async function highlight(
|
||||
]
|
||||
|
||||
if (attributes.twoslash) {
|
||||
inlineTransformers.push(transformerTwoSlash({
|
||||
inlineTransformers.push(transformerTwoslash({
|
||||
renderer: rendererRich({
|
||||
classExtra: 'vp-copy-ignore',
|
||||
}),
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { Plugin } from '@vuepress/core'
|
||||
import type { Plugin } from 'vuepress/core'
|
||||
import { highlight } from './highlight.js'
|
||||
import type { HighlighterOptions } from './types'
|
||||
|
||||
|
||||
2622
pnpm-lock.yaml
generated
2622
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:watch": "tsc -b tsconfig.build.json --watch"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vuepress": "2.0.0-rc.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pengzhanbo/utils": "^1.1.1",
|
||||
"@vuepress-plume/plugin-auto-frontmatter": "workspace:*",
|
||||
@ -62,32 +65,28 @@
|
||||
"@vuepress-plume/plugin-iconify": "workspace:*",
|
||||
"@vuepress-plume/plugin-notes-data": "workspace:*",
|
||||
"@vuepress-plume/plugin-shikiji": "workspace:*",
|
||||
"@vuepress/client": "2.0.0-rc.0",
|
||||
"@vuepress/core": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-active-header-links": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-container": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-docsearch": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-external-link-icon": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-git": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-medium-zoom": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-nprogress": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-palette": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-search": "2.0.0-rc.0",
|
||||
"@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",
|
||||
"@vuepress/plugin-active-header-links": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-container": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-docsearch": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-external-link-icon": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-git": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-medium-zoom": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-nprogress": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-palette": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-search": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-theme-data": "2.0.0-rc.1",
|
||||
"@vuepress/plugin-toc": "2.0.0-rc.1",
|
||||
"@vueuse/core": "^10.7.2",
|
||||
"date-fns": "^3.3.0",
|
||||
"date-fns": "^3.3.1",
|
||||
"katex": "^0.16.9",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"nanoid": "^5.0.4",
|
||||
"vue": "^3.4.15",
|
||||
"vue-router": "4.2.5",
|
||||
"vuepress-plugin-comment2": "2.0.0-rc.10",
|
||||
"vuepress-plugin-md-enhance": "2.0.0-rc.10",
|
||||
"vuepress-plugin-reading-time2": "2.0.0-rc.10",
|
||||
"vuepress-plugin-seo2": "2.0.0-rc.10",
|
||||
"vuepress-plugin-sitemap2": "2.0.0-rc.10"
|
||||
"vuepress-plugin-comment2": "2.0.0-rc.15",
|
||||
"vuepress-plugin-md-enhance": "2.0.0-rc.15",
|
||||
"vuepress-plugin-reading-time2": "2.0.0-rc.15",
|
||||
"vuepress-plugin-seo2": "2.0.0-rc.15",
|
||||
"vuepress-plugin-sitemap2": "2.0.0-rc.15"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useElementSize, useWindowScroll, useWindowSize } from '@vueuse/core'
|
||||
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 IconBackToTop from './icons/IconBackToTop.vue'
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import type { PlumeThemePageData } from '../../shared/index.js'
|
||||
import Archives from './Archives.vue'
|
||||
import BlogAside from './BlogAside.vue'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { PageHeader } from '@vuepress/client'
|
||||
import type { PageHeader } from 'vuepress/client'
|
||||
|
||||
defineProps<{
|
||||
headers: PageHeader[]
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import { isActive } from '../../utils/index.js'
|
||||
import AutoLink from '../AutoLink.vue'
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageFrontmatter } from '@vuepress/client'
|
||||
import { usePageFrontmatter } from 'vuepress/client'
|
||||
import { computed } from 'vue'
|
||||
import type { PlumeThemeFriendsFrontmatter } from '../../shared/index.js'
|
||||
import { useEditNavLink } from '../composables/index.js'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageFrontmatter, withBase } from '@vuepress/client'
|
||||
import { usePageFrontmatter, withBase } from 'vuepress/client'
|
||||
import { computed } from 'vue'
|
||||
import type { PlumeThemeHomeFrontmatter } from '../../shared/index.js'
|
||||
import { useDarkMode } from '../composables/darkMode.js'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import { useWindowScroll } from '@vueuse/core'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import type {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { PageHeader } from '@vuepress/client'
|
||||
import type { PageHeader } from 'vuepress/client'
|
||||
import { onClickOutside } from '@vueuse/core'
|
||||
import { nextTick, ref, watch } from 'vue'
|
||||
import { useThemeLocaleData } from '../composables/index.js'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageFrontmatter } from '@vuepress/client'
|
||||
import { usePageFrontmatter } from 'vuepress/client'
|
||||
import { useWindowScroll } from '@vueuse/core'
|
||||
import { ref, watchPostEffect } from 'vue'
|
||||
import { useSidebar } from '../../composables/sidebar.js'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import { computed } from 'vue'
|
||||
import type { NavItem, NavItemWithChildren } from '../../../shared/index.js'
|
||||
import { isActive } from '../../utils/index.js'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import type { NavItemWithLink } from '../../../shared/index.js'
|
||||
import { isActive } from '../../utils/index.js'
|
||||
import AutoLink from '../AutoLink.vue'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { useSiteLocaleData, withBase } from '@vuepress/client'
|
||||
import { useRouteLocale, useSiteLocaleData, withBase } from 'vuepress/client'
|
||||
import { useSidebar } from '../../composables/index.js'
|
||||
import { useThemeLocaleData } from '../../composables/themeData.js'
|
||||
import AutoLink from '../AutoLink.vue'
|
||||
@ -8,11 +8,12 @@ import VImage from '../VImage.vue'
|
||||
const theme = useThemeLocaleData()
|
||||
const site = useSiteLocaleData()
|
||||
const { hasSidebar } = useSidebar()
|
||||
const routeLocale = useRouteLocale()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="navbar-title" :class="{ 'has-sidebar': hasSidebar }">
|
||||
<AutoLink class="title" :href="theme.home || withBase('/')">
|
||||
<AutoLink class="title" :href="theme.home ?? withBase(routeLocale)">
|
||||
<VImage
|
||||
v-if="theme.logo"
|
||||
class="logo"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
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'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import { computed } from 'vue'
|
||||
import { useMediumZoom } from '@vuepress/plugin-medium-zoom/client'
|
||||
import { onContentUpdated } from '@vuepress-plume/plugin-content-update/client'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import { computed, ref } from 'vue'
|
||||
import { onContentUpdated } from '@vuepress-plume/plugin-content-update/client'
|
||||
import { useActiveAnchor, useThemeLocaleData } from '../composables/index.js'
|
||||
@ -21,14 +21,6 @@ const marker = ref()
|
||||
|
||||
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() {
|
||||
window.print()
|
||||
}
|
||||
@ -56,7 +48,6 @@ function handlePrint() {
|
||||
<PageAsideItem
|
||||
:headers="headers"
|
||||
:root="true"
|
||||
:on-click="handleClick"
|
||||
/>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@ -1,19 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import type { PageHeader } from '@vuepress/client'
|
||||
import type { PageHeader } from 'vuepress/client'
|
||||
|
||||
defineProps<{
|
||||
headers: PageHeader[]
|
||||
onClick: (e: MouseEvent) => void
|
||||
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>
|
||||
|
||||
<template>
|
||||
<ul :class="root ? 'root' : 'nested'">
|
||||
<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">
|
||||
<PageAsideItem :headers="children" :on-click="onClick" />
|
||||
<PageAsideItem :headers="children" />
|
||||
</template>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -184,6 +184,12 @@ const showFooter = computed(() => {
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.prev-next {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.pager-link {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePageData, usePageFrontmatter } from '@vuepress/client'
|
||||
import { usePageData, usePageFrontmatter } from 'vuepress/client'
|
||||
import { computed } from 'vue'
|
||||
import type {
|
||||
PlumeThemePageData,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { withBase } from '@vuepress/client'
|
||||
import { withBase } from 'vuepress/client'
|
||||
|
||||
defineProps<{
|
||||
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 { computed } from 'vue'
|
||||
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 type { PlumeThemePageData } from '../../shared/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 { normalizeLink } from '../utils'
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { usePageData, usePageFrontmatter, usePageLang } from '@vuepress/client'
|
||||
import { isArray, isPlainObject, isString } from '@vuepress/shared'
|
||||
import { usePageData, usePageFrontmatter, usePageLang } from 'vuepress/client'
|
||||
import { isPlainObject, isString } from 'vuepress/shared'
|
||||
import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client'
|
||||
import type { NotesSidebarItem } from '@vuepress-plume/plugin-notes-data'
|
||||
import { computed } from 'vue'
|
||||
@ -115,7 +115,7 @@ function flatSidebar(sidebar: NotesSidebarItem[], res: NavItemWithLink[] = []):
|
||||
if (item.link)
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import { computed } from 'vue'
|
||||
import type {
|
||||
PlumeThemePageData,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { PageData } from '@vuepress/client'
|
||||
import { usePageData, usePageFrontmatter, withBase } from '@vuepress/client'
|
||||
import type { PageData } from 'vuepress/client'
|
||||
import { usePageData, usePageFrontmatter, withBase } from 'vuepress/client'
|
||||
import type {
|
||||
NotesData,
|
||||
NotesSidebarItem,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { isFunction, isString } from '@vuepress/shared'
|
||||
import { isFunction, isString } from 'vuepress/shared'
|
||||
import { useRouter } from 'vue-router'
|
||||
import type { Router } from 'vue-router'
|
||||
import type { NavItemWithLink } from '../../shared/index.js'
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
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 Badge from './components/global/Badge.vue'
|
||||
import ExternalLinkIcon from './components/global/ExternalLinkIcon.vue'
|
||||
@ -56,4 +57,4 @@ export default defineClientConfig({
|
||||
Layout,
|
||||
NotFound,
|
||||
},
|
||||
})
|
||||
}) as ClientConfig
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { usePageData } from '@vuepress/client'
|
||||
import { usePageData } from 'vuepress/client'
|
||||
import { computed, provide, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import type { PlumeThemePageData } from '../../shared/index.js'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useRouteLocale, withBase } from '@vuepress/client'
|
||||
import { useRouteLocale, withBase } from 'vuepress/client'
|
||||
import LayoutContent from '../components/LayoutContent.vue'
|
||||
import Nav from '../components/Nav/index.vue'
|
||||
import { useThemeLocaleData } from '../composables'
|
||||
|
||||
@ -10,16 +10,14 @@ html:not(.dark) .vp-code span {
|
||||
pre {
|
||||
padding: 1.3rem 1.5rem;
|
||||
margin: 0 0 0.85rem;
|
||||
overflow: auto;
|
||||
font-size: 14px;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
|
||||
scrollbar-color: var(--vp-c-brand-1) var(--vp-c-border);
|
||||
scrollbar-width: thin;
|
||||
|
||||
code {
|
||||
padding: 0;
|
||||
color: #fff;
|
||||
font-size: var(--vp-code-font-size);
|
||||
color: var(--vp-code-block-color);
|
||||
overflow-wrap: unset;
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
@ -27,6 +25,12 @@ html:not(.dark) .vp-code span {
|
||||
-webkit-font-smoothing: auto;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
& {
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.line-number {
|
||||
@ -41,14 +45,20 @@ html:not(.dark) .vp-code span {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 639px) {
|
||||
.plume-content li pre {
|
||||
border-radius: 8px 0 0 8px;
|
||||
}
|
||||
}
|
||||
|
||||
div[class*="language-"] {
|
||||
position: relative;
|
||||
margin: 0.85rem -1.5rem;
|
||||
background-color: var(--vp-code-block-bg);
|
||||
border-radius: 6px;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 0.8em;
|
||||
top: 5px;
|
||||
right: 1em;
|
||||
z-index: 3;
|
||||
font-size: 0.75rem;
|
||||
@ -58,6 +68,7 @@ div[class*="language-"] {
|
||||
|
||||
code {
|
||||
display: inline-block;
|
||||
width: fit-content;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
@ -69,6 +80,27 @@ div[class*="language-"] {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
|
||||
/* rtl:ignore */
|
||||
text-align: left;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
|
||||
/* rtl:ignore */
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.highlight-lines {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -117,8 +149,8 @@ div[class*="language-"] {
|
||||
z-index: 1;
|
||||
width: 2rem;
|
||||
height: 100%;
|
||||
padding-top: 1.25rem;
|
||||
line-height: var(--vp-code-line-height);
|
||||
padding-top: 1.3rem;
|
||||
line-height: 1.4rem;
|
||||
color: var(--vp-code-line-number-color);
|
||||
text-align: center;
|
||||
counter-reset: line-number;
|
||||
@ -138,6 +170,19 @@ div[class*="language-"] {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
& {
|
||||
margin: 0;
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 639px) {
|
||||
.plume-content li & {
|
||||
border-radius: 8px 0 0 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.plume-content [class*="language-"] code .highlighted {
|
||||
@ -206,11 +251,11 @@ div[class*="language-"] {
|
||||
}
|
||||
|
||||
// narrow mobile
|
||||
@media (max-width: 419px) {
|
||||
.plume-content {
|
||||
div[class*="language-"] {
|
||||
margin: 0.85rem -1.5rem;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// @media (max-width: 419px) {
|
||||
// .plume-content {
|
||||
// div[class*="language-"] {
|
||||
// margin: 0.85rem -1.5rem;
|
||||
// border-radius: 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
.plume-content h6 {
|
||||
position: relative;
|
||||
font-weight: 600;
|
||||
overflow-wrap: break-word;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@ -40,30 +41,29 @@
|
||||
}
|
||||
|
||||
.plume-content .header-anchor {
|
||||
float: left;
|
||||
padding-right: 0.23em;
|
||||
margin-left: -0.87em;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
opacity: 0;
|
||||
transition:
|
||||
color 0.25s,
|
||||
opacity 0.25s;
|
||||
}
|
||||
position: relative;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
|
||||
.plume-content h1:hover .header-anchor,
|
||||
.plume-content h1 .header-anchor:focus,
|
||||
.plume-content h2:hover .header-anchor,
|
||||
.plume-content h2 .header-anchor:focus,
|
||||
.plume-content h3:hover .header-anchor,
|
||||
.plume-content h3 .header-anchor:focus,
|
||||
.plume-content h4:hover .header-anchor,
|
||||
.plume-content h4 .header-anchor:focus,
|
||||
.plume-content h5:hover .header-anchor,
|
||||
.plume-content h5 .header-anchor:focus,
|
||||
.plume-content h6:hover .header-anchor,
|
||||
.plume-content h6 .header-anchor:focus {
|
||||
opacity: 1;
|
||||
&:hover::before {
|
||||
position: absolute;
|
||||
left: -0.75em;
|
||||
font-size: 0.8em;
|
||||
color: var(--vp-c-brand-1);
|
||||
content: var(--vp-header-anchor-symbol);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
left: -0.75em;
|
||||
color: var(--vp-c-brand-1);
|
||||
content: var(--vp-header-anchor-symbol);
|
||||
outline: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
@ -122,9 +122,18 @@
|
||||
color 0.25s,
|
||||
opacity 0.25s,
|
||||
text-underline-offset 0.25s;
|
||||
|
||||
@media print {
|
||||
&[href^="http://"],
|
||||
&[href^="https://"] {
|
||||
&::after {
|
||||
content: " (" attr(href) ") ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.plume-content a:hover {
|
||||
.plume-content :not(h1,h2,h3,h4,h5,h6) a:hover {
|
||||
color: var(--vp-c-brand-2);
|
||||
text-underline-offset: 5px;
|
||||
}
|
||||
|
||||
@ -39,6 +39,10 @@
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
div[class*="language-"].line-numbers-mode .line-numbers {
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 419px) {
|
||||
div[class*="language-"] {
|
||||
margin: 0.85rem -0.75rem 0.85rem -1rem;
|
||||
|
||||
@ -61,11 +61,11 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) {
|
||||
transition-timing-function: ease;
|
||||
}
|
||||
|
||||
.twoslash .twoslash-popup-info {
|
||||
.twoslash .twoslash-popup-container {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
display: inline-block;
|
||||
padding: 4px 6px;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
text-align: left;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
@ -78,19 +78,19 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) {
|
||||
transform: translateY(1.5em);
|
||||
}
|
||||
|
||||
.twoslash .twoslash-query-presisted .twoslash-popup-info {
|
||||
.twoslash .twoslash-query-presisted .twoslash-popup-container {
|
||||
left: 50%;
|
||||
z-index: 9;
|
||||
transform: translate(-1.3em, 1.8em);
|
||||
}
|
||||
|
||||
.twoslash .twoslash-hover:hover .twoslash-popup-info,
|
||||
.twoslash .twoslash-query-presisted .twoslash-popup-info {
|
||||
.twoslash .twoslash-hover:hover .twoslash-popup-container,
|
||||
.twoslash .twoslash-query-presisted .twoslash-popup-container {
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.twoslash .twoslash-popup-info:hover {
|
||||
.twoslash .twoslash-popup-container:hover {
|
||||
user-select: auto;
|
||||
}
|
||||
|
||||
@ -107,12 +107,26 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.twoslash .twoslash-popup-jsdoc {
|
||||
padding-top: 6px;
|
||||
padding-bottom: 2px;
|
||||
.twoslash .twoslash-popup-code,
|
||||
.twoslash .twoslash-popup-docs {
|
||||
padding: 6px 8px !important;
|
||||
}
|
||||
|
||||
.twoslash .twoslash-popup-docs {
|
||||
font-family: sans-serif;
|
||||
font-size: 0.8em;
|
||||
color: var(--twoslash-jsdoc-color);
|
||||
border-top: 1px solid var(--twoslash-border-color);
|
||||
}
|
||||
|
||||
.twoslash .twoslash-popup-docs-tags {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.twoslash .twoslash-popup-docs-tags,
|
||||
.twoslash .twoslash-popup-docs-tag-name {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
/* ===== Error Line ===== */
|
||||
@ -133,23 +147,17 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) {
|
||||
}
|
||||
|
||||
/* ===== Completeions ===== */
|
||||
.twoslash .twoslash-completions-list {
|
||||
.twoslash .twoslash-completion-cursor {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.twoslash .twoslash-completions-list ul {
|
||||
.twoslash .twoslash-completion-cursor .twoslash-completion-list {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 8;
|
||||
display: inline-block;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
width: 240px;
|
||||
padding: 4px;
|
||||
margin: 3px 0 0 -1px;
|
||||
font-size: 0.8rem;
|
||||
user-select: none;
|
||||
background: var(--twoslash-popup-bg);
|
||||
border: 1px solid var(--twoslash-border-color);
|
||||
@ -157,11 +165,20 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) {
|
||||
transform: translate(0, 1.2em);
|
||||
}
|
||||
|
||||
.twoslash .twoslash-completions-list ul:hover {
|
||||
.twoslash-completion-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
width: 240px;
|
||||
padding: 4px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.twoslash-completion-list:hover {
|
||||
user-select: auto;
|
||||
}
|
||||
|
||||
.twoslash .twoslash-completions-list ul::before {
|
||||
.twoslash-completion-list::before {
|
||||
position: absolute;
|
||||
top: -1.6em;
|
||||
left: -1px;
|
||||
@ -171,7 +188,7 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) {
|
||||
background-color: var(--twoslash-cursor-color);
|
||||
}
|
||||
|
||||
.twoslash .twoslash-completions-list ul li {
|
||||
.twoslash-completion-list li {
|
||||
display: flex;
|
||||
gap: 0.25em;
|
||||
align-items: center;
|
||||
@ -179,21 +196,30 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) {
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.twoslash .twoslash-completions-list ul li span.twoslash-completions-unmatched {
|
||||
.twoslash-completion-list li span.twoslash-completions-unmatched {
|
||||
color: var(--twoslash-unmatched-color);
|
||||
}
|
||||
|
||||
.twoslash .twoslash-completions-list ul .deprecated {
|
||||
.twoslash-completion-list .deprecated {
|
||||
text-decoration: line-through;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.twoslash .twoslash-completions-list ul li span.twoslash-completions-matched {
|
||||
.twoslash-completion-list li span.twoslash-completions-matched {
|
||||
color: var(--twoslash-matched-color);
|
||||
}
|
||||
|
||||
/* Highlights */
|
||||
.twoslash-highlighted {
|
||||
padding: 1px 2px;
|
||||
margin: -1px -3px;
|
||||
background-color: var(--twoslash-highlighted-bg);
|
||||
border: 1px solid var(--twoslash-highlighted-border);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.twoslash .twoslash-completions-list .twoslash-completions-icon {
|
||||
.twoslash-completion-list .twoslash-completions-icon {
|
||||
flex: none;
|
||||
width: 1em;
|
||||
color: var(--twoslash-unmatched-color);
|
||||
@ -205,7 +231,7 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) {
|
||||
display: flex;
|
||||
gap: 0.3em;
|
||||
align-items: center;
|
||||
padding: 6px;
|
||||
padding: 6px 10px;
|
||||
margin: 0.2em 0;
|
||||
color: var(--twoslash-tag-color);
|
||||
background-color: var(--twoslash-tag-bg);
|
||||
|
||||
@ -68,10 +68,10 @@
|
||||
--vp-c-red-3: #e0575b;
|
||||
--vp-c-red-soft: rgba(244, 63, 94, 0.14);
|
||||
|
||||
--vp-c-purple-1: #734bb0;
|
||||
--vp-c-purple-2: #9a72da;
|
||||
--vp-c-purple-3: #d2c5e7;
|
||||
--vp-c-purple-soft: rgba(109, 85, 148, 0.14);
|
||||
--vp-c-purple-1: #6f42c1;
|
||||
--vp-c-purple-2: #7e4cc9;
|
||||
--vp-c-purple-3: #8e5cd9;
|
||||
--vp-c-purple-soft: rgba(159, 122, 234, 0.14);
|
||||
|
||||
--vp-c-sponsor: #db2777;
|
||||
}
|
||||
@ -97,15 +97,15 @@
|
||||
--vp-c-yellow-3: #a46a0a;
|
||||
--vp-c-yellow-soft: rgba(234, 179, 8, 0.16);
|
||||
|
||||
--vp-c-purple-1: #9c74da;
|
||||
--vp-c-purple-2: #a987df;
|
||||
--vp-c-purple-3: #c3b4da;
|
||||
--vp-c-purple-soft: rgba(109, 85, 148, 0.16);
|
||||
|
||||
--vp-c-red-1: #f66f81;
|
||||
--vp-c-red-2: #f14158;
|
||||
--vp-c-red-3: #b62a3c;
|
||||
--vp-c-red-soft: rgba(244, 63, 94, 0.16);
|
||||
|
||||
--vp-c-purple-1: #c8abfa;
|
||||
--vp-c-purple-2: #a879e6;
|
||||
--vp-c-purple-3: #8e5cd9;
|
||||
--vp-c-purple-soft: rgba(159, 122, 234, 0.16);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -273,6 +273,7 @@
|
||||
"Liberation Mono",
|
||||
"Courier New",
|
||||
monospace;
|
||||
--vp-header-anchor-symbol: "#";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -459,7 +460,7 @@ html[lang="zh-CN"] {
|
||||
--vp-input-border-color: var(--vp-c-border);
|
||||
--vp-input-bg-color: var(--vp-c-bg-alt);
|
||||
|
||||
--vp-input-switch-bg-color: var(--vp-c-gray-soft);
|
||||
--vp-input-switch-bg-color: var(--vp-c-default-soft);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -595,7 +596,7 @@ html[lang="zh-CN"] {
|
||||
/* md enhance code-tabs */
|
||||
:root {
|
||||
--code-tabs-nav-text-color: var(--vp-c-text-1);
|
||||
--code-tabs-nav-bg-color: #e6e6e7;
|
||||
--code-tabs-nav-bg-color: var(--vp-c-default-3);
|
||||
--code-tabs-nav-hover-color: var(--vp-code-block-bg);
|
||||
}
|
||||
|
||||
@ -658,7 +659,7 @@ html.dark {
|
||||
:root {
|
||||
--tab-bg-color: var(--vp-c-bg);
|
||||
--tab-nav-bg-color: var(--vp-c-bg-soft);
|
||||
--tab-nav-hover-color: var(--vp-c-bg);
|
||||
--tab-nav-hover-color: var(--tab-bg-color);
|
||||
--tab-nav-text-color: var(--vp-c-text-1);
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { withBase } from '@vuepress/client'
|
||||
import { withBase } from 'vuepress/client'
|
||||
import { PATHNAME_PROTOCOL_RE, isExternal } from './shared.js'
|
||||
|
||||
export function normalizeLink(url: string): string {
|
||||
|
||||
@ -2,7 +2,7 @@ import {
|
||||
isLinkHttp,
|
||||
removeEndingSlash,
|
||||
removeLeadingSlash,
|
||||
} from '@vuepress/shared'
|
||||
} from 'vuepress/shared'
|
||||
import { resolveRepoType } 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
|
||||
|
||||
|
||||
@ -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>',
|
||||
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>',
|
||||
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:
|
||||
'<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:
|
||||
'<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:
|
||||
'<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>',
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { path } from '@vuepress/utils'
|
||||
import type { App } from '@vuepress/core'
|
||||
import { resolveLocalePath } from '@vuepress/shared'
|
||||
import { path } from 'vuepress/utils'
|
||||
import type { App } from 'vuepress/core'
|
||||
import { resolveLocalePath } from 'vuepress/shared'
|
||||
import type {
|
||||
AutoFrontmatterOptions,
|
||||
FrontmatterArray,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import containerPlugin from '@vuepress/plugin-container'
|
||||
import type { Plugin } from '@vuepress/core'
|
||||
import type { Plugin } from 'vuepress/core'
|
||||
|
||||
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 type { PlumeThemeLocaleOptions } from '../shared/index.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 { docsearchPlugin } from '@vuepress/plugin-docsearch'
|
||||
import { externalLinkIconPlugin } from '@vuepress/plugin-external-link-icon'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
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 { normalizePath } from './utils.js'
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { DocsearchPluginOptions } from '@vuepress/plugin-docsearch'
|
||||
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 { resolvedAppLocales } from './resolveLocaleOptions.js'
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { path } from '@vuepress/utils'
|
||||
import type { App, Page } from '@vuepress/core'
|
||||
import { createPage } from '@vuepress/core'
|
||||
import { path } from 'vuepress/utils'
|
||||
import type { App, Page } from 'vuepress/core'
|
||||
import { createPage } from 'vuepress/core'
|
||||
import type {
|
||||
PageCategoryData,
|
||||
PlumeThemeLocaleOptions,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { Page, Theme } from '@vuepress/core'
|
||||
import { templateRenderer } from '@vuepress/utils'
|
||||
import type { Page, Theme } from 'vuepress/core'
|
||||
import { templateRenderer } from 'vuepress/utils'
|
||||
import type { PlumeThemeOptions, PlumeThemePageData } from '../shared/index.js'
|
||||
import { mergeLocaleOptions } from './defaultOptions.js'
|
||||
import { setupPlugins } from './plugins.js'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user