Merge pull request #48 from pengzhanbo/RC-31

RC-31
This commit is contained in:
pengzhanbo 2024-02-02 10:49:01 +08:00 committed by GitHub
commit 3f85824875
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
42 changed files with 620 additions and 288 deletions

View File

@ -1,8 +1,9 @@
import themePlume from 'vuepress-theme-plume'
import type { Theme } from 'vuepress'
import { enNotes, zhNotes } from './notes.js'
import { enNavbar, zhNavbar } from './navbar.js'
export const theme = themePlume({
export const theme: Theme = themePlume({
logo: 'https://pengzhanbo.cn/g.gif',
hostname: 'https://pengzhanbo.cn',
repo: 'https://github.com/pengzhanbo/vuepress-theme-plume',
@ -15,6 +16,7 @@ export const theme = themePlume({
},
social: [{ icon: 'github', link: 'https://github.com/pengzhanbo' }],
footer: { copyright: 'Copyright © 2022-present pengzhanbo' },
locales: {

View File

@ -2,13 +2,14 @@
"name": "@vuepress-plume/plugin-auto-frontmatter",
"type": "module",
"version": "1.0.0-rc.30",
"description": "The Plugin for VuePres 2",
"description": "The Plugin for VuePres 2 - auto frontmatter",
"author": "pengzhanbo <volodymyr@foxmail.com>",
"license": "MIT",
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-auto-frontmatter"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -2,13 +2,14 @@
"name": "@vuepress-plume/plugin-baidu-tongji",
"type": "module",
"version": "1.0.0-rc.30",
"description": "The Plugin for VuePres 2",
"description": "The Plugin for VuePres 2 - baidu tongji",
"author": "pengzhanbo <volodymyr@foxmail.com> (https://github.com/pengzhanbo/)",
"license": "MIT",
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-baidu-tongji"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -2,13 +2,14 @@
"name": "@vuepress-plume/plugin-blog-data",
"type": "module",
"version": "1.0.0-rc.30",
"description": "The Plugin for VuePres 2",
"description": "The Plugin for VuePres 2 - blog data",
"author": "pengzhanbo <volodymyr@foxmail.com>",
"license": "MIT",
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-blog-data"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -2,6 +2,7 @@ import type { BlogPostData } from '../shared/index.js'
declare module '@internal/blogData' {
const blogPostData: BlogPostData
const extraBlogData: Record<string, any>
export { blogPostData }
export { blogPostData, extraBlogData }
}

View File

@ -1,4 +1,7 @@
import { blogPostData as blogPostDataRaw } from '@internal/blogData'
import {
blogPostData as blogPostDataRaw,
extraBlogData as extraBlogDataRaw,
} from '@internal/blogData'
import { ref } from 'vue'
import type { Ref } from 'vue'
import type { BlogPostData } from '../../shared/index.js'
@ -15,8 +18,19 @@ export function useBlogPostData<
return blogPostData as BlogDataRef<T>
}
export type ExtraBlogDataRef = Ref<Record<string, any>>
export const extraBlogData: ExtraBlogDataRef = ref(extraBlogDataRaw)
export function useExtraBlogData(): ExtraBlogDataRef {
return extraBlogData as ExtraBlogDataRef
}
if (__VUEPRESS_DEV__ && (import.meta.webpackHot || import.meta.hot)) {
__VUE_HMR_RUNTIME__.updateBlogData = (data: BlogPostData) => {
blogPostData.value = data
}
__VUE_HMR_RUNTIME__.updateExtraBlogData = (data: Record<string, any>) => {
extraBlogData.value = data
}
}

View File

@ -8,11 +8,15 @@ if (import.meta.webpackHot) {
if (__VUE_HMR_RUNTIME__.updateBlogData) {
__VUE_HMR_RUNTIME__.updateBlogData(blogPostData)
}
if (__VUE_HMR_RUNTIME__.updateExtraBlogData) {
__VUE_HMR_RUNTIME__.updateExtraBlogData(extraBlogData)
}
}
if (import.meta.hot) {
import.meta.hot.accept(({ blogPostData }) => {
import.meta.hot.accept(({ blogPostData, extraBlogData }) => {
__VUE_HMR_RUNTIME__.updateBlogData(blogPostData)
__VUE_HMR_RUNTIME__.updateExtraBlogData(extraBlogData)
})
}
`
@ -47,10 +51,15 @@ export async function preparedBlogData(app: App, pageFilter: (id: string) => boo
})
}
const extraBlogData: Record<string, any> = {}
if (typeof options.extraBlogData === 'function')
options.extraBlogData(extraBlogData)
const blogData: BlogPostData = pages.map((page: Page) => {
let extended: Partial<BlogPostDataItem> = {}
if (typeof options.extendBlogData === 'function')
extended = options.extendBlogData(page)
extended = options.extendBlogData(page, extraBlogData)
const data = {
path: page.path,
@ -69,7 +78,10 @@ export async function preparedBlogData(app: App, pageFilter: (id: string) => boo
let content = `\
export const blogPostData = JSON.parse(${JSON.stringify(
JSON.stringify(blogData),
)})
)});
export const extraBlogData = JSON.parse(${JSON.stringify(
JSON.stringify(extraBlogData),
)});
`
// inject HMR code

View File

@ -5,8 +5,10 @@ export interface BlogDataPluginOptions {
exclude?: string | string[]
sortBy?: 'createTime' | false | (<T>(prev: T, next: T) => boolean)
excerpt?: boolean
extendBlogData?: <T = any>(page: T) => Record<string, any>
extendBlogData?: <T = any>(page: T, extra: Record<string, any>) => Record<string, any>
pageFilter?: (page: Page) => boolean
extraBlogData?: (extra: Record<string, any>) => void
}
export type BlogPostData<T extends object = object> = BlogPostDataItem<T>[]

View File

@ -8,7 +8,8 @@
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-caniuse"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -2,13 +2,14 @@
"name": "@vuepress-plume/plugin-content-update",
"type": "module",
"version": "1.0.0-rc.30",
"description": "The Plugin for VuePres 2",
"description": "The Plugin for VuePres 2 - content update",
"author": "pengzhanbo <volodymyr@foxmail.com>",
"license": "MIT",
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-content-update"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -2,13 +2,14 @@
"name": "@vuepress-plume/plugin-copy-code",
"type": "module",
"version": "1.0.0-rc.30",
"description": "The Plugin for VuePres 2",
"description": "The Plugin for VuePres 2 - copy code",
"author": "pengzhanbo <volodymyr@foxmail.com>",
"license": "MIT",
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-copy-code"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -2,13 +2,14 @@
"name": "@vuepress-plume/plugin-iconify",
"type": "module",
"version": "1.0.0-rc.30",
"description": "The Plugin for VuePres 2",
"description": "The Plugin for VuePres 2 - iconify",
"author": "pengzhanbo <volodymyr@foxmail.com>",
"license": "MIT",
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-iconify"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -8,7 +8,8 @@
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-netlify-functions"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -2,13 +2,14 @@
"name": "@vuepress-plume/plugin-notes-data",
"type": "module",
"version": "1.0.0-rc.30",
"description": "The Plugin for VuePres 2",
"description": "The Plugin for VuePres 2 - notes data",
"author": "pengzhanbo <volodymyr@foxmail.com>",
"license": "MIT",
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-notes-data"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"

View File

@ -8,7 +8,8 @@
"homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git",
"directory": "plugins/plugin-shikiji"
},
"bugs": {
"url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues"
@ -35,11 +36,11 @@
"vuepress": "2.0.0-rc.2"
},
"dependencies": {
"@shikijs/transformers": "1.0.0-beta.0",
"@shikijs/twoslash": "1.0.0-beta.0",
"@shikijs/transformers": "1.0.0-beta.3",
"@shikijs/twoslash": "1.0.0-beta.3",
"nanoid": "^5.0.4",
"picocolors": "^1.0.0",
"shiki": "1.0.0-beta.0"
"shiki": "1.0.0-beta.3"
},
"publishConfig": {
"access": "public"

View File

@ -1,6 +1,6 @@
import { shikijiPlugin } from './shikijiPlugin.js'
import { shikiPlugin } from './shikijiPlugin.js'
export * from './shikijiPlugin.js'
export * from './types.js'
export default shikijiPlugin
export default shikiPlugin

View File

@ -2,9 +2,9 @@ import type { Plugin } from 'vuepress/core'
import { highlight } from './highlight.js'
import type { HighlighterOptions } from './types'
export type ShikijiPluginOptions = HighlighterOptions
export type ShikiPluginOptions = HighlighterOptions
export function shikijiPlugin(options: ShikijiPluginOptions = {}): Plugin {
export function shikiPlugin(options: ShikiPluginOptions = {}): Plugin {
return {
name: '@vuepress-plume/plugin-shikiji',

View File

@ -20,13 +20,17 @@ export interface HighlighterOptions {
*
* You can also pass an object with `light` and `dark` themes to support dual themes.
*
* You can use an existing theme.
*
* @see https://shiki.style/themes
*
* Or add your own theme.
*
* @see https://shiki.style/guide/load-theme
*
* @example { theme: 'github-dark' }
* @example { theme: { light: 'github-light', dark: 'github-dark' } }
*
* You can use an existing theme.
* @see https://shiki.style/themes
* Or add your own theme.
* @see https://shiki.style/guide/load-theme
*/
theme?: ThemeOptions
/**

254
pnpm-lock.yaml generated
View File

@ -280,11 +280,11 @@ importers:
plugins/plugin-shikiji:
dependencies:
'@shikijs/transformers':
specifier: 1.0.0-beta.0
version: 1.0.0-beta.0
specifier: 1.0.0-beta.3
version: 1.0.0-beta.3
'@shikijs/twoslash':
specifier: 1.0.0-beta.0
version: 1.0.0-beta.0(typescript@5.3.3)
specifier: 1.0.0-beta.3
version: 1.0.0-beta.3(typescript@5.3.3)
nanoid:
specifier: ^5.0.4
version: 5.0.4
@ -292,8 +292,8 @@ importers:
specifier: ^1.0.0
version: 1.0.0
shiki:
specifier: 1.0.0-beta.0
version: 1.0.0-beta.0
specifier: 1.0.0-beta.3
version: 1.0.0-beta.3
vuepress:
specifier: 2.0.0-rc.2
version: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
@ -331,38 +331,44 @@ importers:
specifier: workspace:*
version: link:../plugins/plugin-shikiji
'@vuepress/plugin-active-header-links':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-container':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(vuepress@2.0.0-rc.2)
'@vuepress/plugin-docsearch':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(@algolia/client-search@4.20.0)(search-insights@2.7.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(@algolia/client-search@4.20.0)(search-insights@2.7.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-external-link-icon':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-git':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(vuepress@2.0.0-rc.2)
'@vuepress/plugin-medium-zoom':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-nprogress':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-palette':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(vuepress@2.0.0-rc.2)
'@vuepress/plugin-search':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-seo':
specifier: 2.0.0-rc.6
version: 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-sitemap':
specifier: 2.0.0-rc.6
version: 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-theme-data':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vuepress/plugin-toc':
specifier: 2.0.0-rc.1
version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.3
version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vueuse/core':
specifier: ^10.7.2
version: 10.7.2(vue@3.4.15)
@ -388,20 +394,14 @@ importers:
specifier: 2.0.0-rc.2
version: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
vuepress-plugin-comment2:
specifier: 2.0.0-rc.16
version: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.18
version: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-plugin-md-enhance:
specifier: 2.0.0-rc.16
version: 2.0.0-rc.16(katex@0.16.9)(markdown-it@14.0.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.18
version: 2.0.0-rc.18(katex@0.16.9)(markdown-it@14.0.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-plugin-reading-time2:
specifier: 2.0.0-rc.16
version: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-plugin-seo2:
specifier: 2.0.0-rc.16
version: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-plugin-sitemap2:
specifier: 2.0.0-rc.16
version: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
specifier: 2.0.0-rc.18
version: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2)
packages:
@ -3059,20 +3059,20 @@ packages:
dev: false
optional: true
/@shikijs/core@1.0.0-beta.0:
resolution: {integrity: sha512-uicyrkx379Q5sxQuGV3kduHPWIAkjxmeA5A4J6syscx8wiEyIV06i/Q6s9GeKLCb857Hi90H8e/FoFSbcjnZsw==}
/@shikijs/core@1.0.0-beta.3:
resolution: {integrity: sha512-SCwPom2Wn8XxNlEeqdzycU93SKgzYeVsedjqDsgZaz4XiiPpZUzlHt2NAEQTwTnPcHNZapZ6vbkwJ8P11ggL3Q==}
dev: false
/@shikijs/transformers@1.0.0-beta.0:
resolution: {integrity: sha512-OvIO6RxQ7YaQhp34uXVKUPZDRdTcGwBgX3zn26haSvqPwrTQcxdPgT47sr4u3sz1+RwN3RO9AGxCJFRKNpB+Qw==}
/@shikijs/transformers@1.0.0-beta.3:
resolution: {integrity: sha512-ASQQQqxW4dANxMGw4yGkTjtMSsUaRhImv/lzJEdfJ3/eP8TVlVYnohOFQVgpLjBBYGy9P0l0oKrlbjiGosTJ/Q==}
dependencies:
shiki: 1.0.0-beta.0
shiki: 1.0.0-beta.3
dev: false
/@shikijs/twoslash@1.0.0-beta.0(typescript@5.3.3):
resolution: {integrity: sha512-zil9WA4aCs2yJ+1vwt1El8+xp8up9ikh48ksTl7Un8/+dHDAVKjkRD20W+G071cl7NOEEWEynnIMkqqVITNlfA==}
/@shikijs/twoslash@1.0.0-beta.3(typescript@5.3.3):
resolution: {integrity: sha512-lHksLOuWNaU5rZsbJ3ViBn3U8P5f+CGKIcPDuggNczEAyT/nT1CFAHSusE08lJSclAFTNHIkEUE4btUUkxx3Wg==}
dependencies:
'@shikijs/core': 1.0.0-beta.0
'@shikijs/core': 1.0.0-beta.3
twoslash: 0.1.0(typescript@5.3.3)
transitivePeerDependencies:
- supports-color
@ -4036,6 +4036,22 @@ packages:
- typescript
dev: false
/@vuepress/helper@2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-Q4NzyrlZ0ZgEboo7HtrQiXBBLf3EEsqqQLeMFzTcTlDujxkh0Erxp+o1LCWr4wFno3sO6W7OCjM2HeUTiZ5NGQ==}
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
'@vue/shared': 3.4.15
cheerio: 1.0.0-rc.12
fflate: 0.8.1
gray-matter: 4.0.3
vue: 3.4.15(typescript@5.3.3)
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
transitivePeerDependencies:
- typescript
dev: false
/@vuepress/markdown@2.0.0-rc.2(patch_hash=wvnafiipiin2b7vjmkvdw5vom4):
resolution: {integrity: sha512-5/RmJnap+MGKxDhSO+Mv6zB8PoPHhhBujnNKKO3PnyfPrj0LyL0AuTm8m3Ea271wMp9956WINjw8jlpn+Z1sBg==}
dependencies:
@ -4060,8 +4076,8 @@ packages:
dev: false
patched: true
/@vuepress/plugin-active-header-links@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-Ra5exai0mWH9uihzoVH8pje9XXll8zcICmDilTaYhir+KFw1VvKUFGLxLlEXuAMc06K4i25To2BzUVyce1Fijg==}
/@vuepress/plugin-active-header-links@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-ddr8VIrYA/kpWGWx80GeWclSvQoYR9QjXvkx//AMbl5mQqX70GTZrgv5Rbnp6MC8mBxVg6Izy/9eqaJELE+A3g==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4073,8 +4089,8 @@ packages:
- typescript
dev: false
/@vuepress/plugin-container@2.0.0-rc.1(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-60dPvy5u/qp0siE3MWAP/HU+FXKcTzml3/pQRuP1aBEiscUKW1DTD+2KpVT/wC3afHH2yAqDFaxKrVV5dC4+Zw==}
/@vuepress/plugin-container@2.0.0-rc.3(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-wwwtQQYiA21JKKYM4TCjDWxS2p91RPiv62NoWp+Q6BG+E+qnwaA1sOrd36CsEOS2IbIcJdBeHY/zskL0aWKEoQ==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4084,8 +4100,8 @@ packages:
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
dev: false
/@vuepress/plugin-docsearch@2.0.0-rc.1(@algolia/client-search@4.20.0)(search-insights@2.7.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-oawNWGYm4JIeRH6o97muiHQVG+JvFPLX7v5LGD7N4uUm92GYJXIlLqzJer7jekkHhq7VigSWqvXFybCqI2R53w==}
/@vuepress/plugin-docsearch@2.0.0-rc.3(@algolia/client-search@4.20.0)(search-insights@2.7.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-3kf05fviNAahFXNLCOcQEgn/cjJLshCEf6oiezA8Jr6ABj6Q38Ky+nFjX/AjCaoWsyiG4BfbRRxuqxYvsDEimQ==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4107,8 +4123,8 @@ packages:
- typescript
dev: false
/@vuepress/plugin-external-link-icon@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-6zGt5qAnPn+sFJdOpSYAQfq/OV8vRfynTfwtSZVU0QiLVk1GDTTssGjZ32GKxmPPilXF0tiSMTcITfFllnNUmA==}
/@vuepress/plugin-external-link-icon@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-DX4Dn2uj2rAEausB2tz5fe/Ra3oR/B9uR67+yG2lQzZqcZZDW5txsXpZaM0FkXHijzNoS4NKP7k/7qNVe5WvcQ==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4118,8 +4134,8 @@ packages:
- typescript
dev: false
/@vuepress/plugin-git@2.0.0-rc.1(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-k3bS/wxJ5xpxg2Hzy7FEaskpYTKohazP+Dg6z7GUI+rnxfh6H+pMeIWXg/eTTqTC6Zbq1+pNfzuYvZ64GMHpQw==}
/@vuepress/plugin-git@2.0.0-rc.3(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-BQoDWmksC+aSc5V933OuNeU7mfrP4hryhckIFadAhKLVRl6CSXDb96SGVTBxcO1gIgKzItdE67UzMw4T9JJN6A==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4127,8 +4143,8 @@ packages:
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
dev: false
/@vuepress/plugin-medium-zoom@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-5d19cu5z0adXf/HDqFHYcM2dBMlBgK90CAr7YnKgj/nmv2dl6bQ2AtHENUNxOx35c4F3TGgvit9fl+MIaQmrVg==}
/@vuepress/plugin-medium-zoom@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-qRdUt914tQGfmxcqOwnoC6paZLsAJf2S7kllvf59dDKIDg2JlYsAuOq13wps4/hfuUySe9RDlitl6KcqWfvKfw==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4139,8 +4155,8 @@ packages:
- typescript
dev: false
/@vuepress/plugin-nprogress@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-omCUxzWrOrm0c45+0MENY65mUWh+VmUAhckEqQir3waE9Ql7wD4drZ/fdUyfgHarBjSzdSCB6QguQMLwt9OOQw==}
/@vuepress/plugin-nprogress@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-UkbMLvkRps56KF2fsIXtJ0ylRacuPRW9qA1PYwq7XkDqNr4FE5aZsnRHuYIMPUxuhU5t3hRx/zeKOwbctzd2Yw==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4151,8 +4167,8 @@ packages:
- typescript
dev: false
/@vuepress/plugin-palette@2.0.0-rc.1(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-oe/lTE/qcb2lTF3KqQbX/k8oyitM9fo7sKiodPpjxQtjh4cee3BeQhDSNS5NjajDDcj950WBS6gRD6ha5JuuRw==}
/@vuepress/plugin-palette@2.0.0-rc.3(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-BCP2SMEPmaqg4/oHsfA7lpp79iQDZvgeGQCYyWRP2aB5LZ2IiFdyRfZMFOUVzbetsqX7ciOFX3ELG9U59lCOjw==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4160,8 +4176,8 @@ packages:
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
dev: false
/@vuepress/plugin-search@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-zON1YS6udFcDFox/ypbFWNGdpQEDvku/wjlVnwlwBiuhyjWZsjMUIBypjjJx5Q3barWhpPCFJA43YBYCpieTcA==}
/@vuepress/plugin-search@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-dTxOYKPNziWX2vx+RO0PLwj/auABlCCAZT42wQt65R5y5RBA7eptFlqF/jmRXKG+CPvSMUOrIo1FrCTvB3yFig==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4173,8 +4189,31 @@ packages:
- typescript
dev: false
/@vuepress/plugin-theme-data@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-PaVGCY4wsaFFUgue4b7yK5lGoQk4PTx6WwukbTR4cbRqY9kxX2Abpgp5EDoRBrcRbNzt85DV9voMQJr3Vx/BIg==}
/@vuepress/plugin-seo@2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-MIzt1V4wnp5EYBvRt6W54+poguKf2w2YRpyDNa3DkjM/rhrjfSsD7EYP7syp4gzwnIDoxUP3pnENh1mYY9g9bQ==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
'@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
transitivePeerDependencies:
- typescript
dev: false
/@vuepress/plugin-sitemap@2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-yvRSTADF9RHa6JzFeIAxY0BP7wKy+F+naig9BgE0ushC4IQkpjh3VrBtdXhlRKzSMGlLfgmc2kezsObvjvz31w==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
'@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
sitemap: 7.1.1
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
transitivePeerDependencies:
- typescript
dev: false
/@vuepress/plugin-theme-data@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-Uiso+0b2sIaHtPVftjpCEIT+/T4/E9ZpTCL0fnUEa8APnrP7SiIBqph7+KZENvXGg+0B5+MtZROOfFksFfMyFw==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -4185,8 +4224,8 @@ packages:
- typescript
dev: false
/@vuepress/plugin-toc@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-LbhSRNUrKu94ERtTBa/H741LiXDDtM9Hye69DkB89Fl1g50WQiMV+txIRV84qMC8yHHN+ho0DgcDwJdaV1qCfg==}
/@vuepress/plugin-toc@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-cxlJ1iaIHBVEWjZvhYBgZxZTlgQ+1F7xxG13htnn35vVxzflNrqCIXHA54+FDsITHn2T5ATCES90tyywZ6mrbw==}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
@ -13178,10 +13217,10 @@ packages:
/shell-quote@1.8.1:
resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}
/shiki@1.0.0-beta.0:
resolution: {integrity: sha512-CcP0IhEDQ3LWfJC44cfxfId9pjJi9Nephl8DxgrL4tKWprI/oz6deZyL0vB+XWxhTx/1uonzWQKaSQPwKx5dTA==}
/shiki@1.0.0-beta.3:
resolution: {integrity: sha512-z7cHTNSSvwGx2DfeLwjSNLo+HcVxifgNIzLm6Ye52eXcIwNHXT0wHbhy7FDOKSKveuEHBwt9opfj3Hoc8LE1Yg==}
dependencies:
'@shikijs/core': 1.0.0-beta.0
'@shikijs/core': 1.0.0-beta.3
dev: false
/side-channel@1.0.4:
@ -13659,10 +13698,6 @@ packages:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: false
/striptags@3.2.0:
resolution: {integrity: sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw==}
dev: false
/strtok3@7.0.0:
resolution: {integrity: sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==}
engines: {node: '>=14.16'}
@ -14863,8 +14898,8 @@ packages:
typescript: 5.3.3
dev: false
/vuepress-plugin-comment2@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-uZD31oDfEPNrJYG2tuxHI8g3HBVLlbOtiOoZljs9RGCaKqup+MLsSIBNKg/P2uzLkfKybVIUZaTvAEH+QazYeg==}
/vuepress-plugin-comment2@2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-iSCX6aYsf2e6YwzMdygekixARdRPixkgDlFDzDpQTuyr5wdsdp+nMSAS6F4uYtKXFzZgASagbfBMjzN9JLT+Zg==}
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
peerDependencies:
'@waline/client': ^2.15.8 || ^3.0.0-alpha.11
@ -14882,19 +14917,20 @@ packages:
twikoo:
optional: true
dependencies:
'@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
giscus: 1.4.0
vue: 3.4.15(typescript@5.3.3)
vue-router: 4.2.5(vue@3.4.15)
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
vuepress-plugin-sass-palette: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-plugin-sass-palette: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-shared: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2)
transitivePeerDependencies:
- '@vue/composition-api'
- typescript
dev: false
/vuepress-plugin-md-enhance@2.0.0-rc.16(katex@0.16.9)(markdown-it@14.0.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-3XfVUnTBoOk7c77LLZ79keQm2cKVZmGEEggOwpLnmZDr/qZQ5KFDqE1U0OturUwF/tfiyTB8Z9phpuuJ52u6lg==}
/vuepress-plugin-md-enhance@2.0.0-rc.18(katex@0.16.9)(markdown-it@14.0.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-smn8Uagbhyeim+JtOeOdSMio+YXHhHk3RXRjj1z7PLFkY7zcY44v/BvChUDeWV/I4/aaOGWashmSud0Hi1Cs0g==}
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
peerDependencies:
'@types/reveal.js': ^4.4.5
@ -14967,6 +15003,7 @@ packages:
'@mdit/plugin-tex': 0.8.0(markdown-it@14.0.0)
'@mdit/plugin-uml': 0.8.0(markdown-it@14.0.0)
'@types/markdown-it': 13.0.7
'@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vueuse/core': 10.7.2(vue@3.4.15)
balloon-css: 1.2.0
js-yaml: 4.1.0
@ -14974,30 +15011,31 @@ packages:
vue: 3.4.15(typescript@5.3.3)
vue-router: 4.2.5(vue@3.4.15)
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
vuepress-plugin-sass-palette: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-plugin-sass-palette: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-shared: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2)
transitivePeerDependencies:
- '@vue/composition-api'
- markdown-it
- typescript
dev: false
/vuepress-plugin-reading-time2@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-7XzyyoR/qV/3an6KWl91+NSBIhSn10HbIXDG7AnblS5aVVz8FHRJPtnmJryVRVIPZNwIk8QSfnczR3GVwbaSyg==}
/vuepress-plugin-reading-time2@2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-Sj245CYGo0F5Axz6JN6nslcvyZ+1HtfraIPC7MNfPzJgOR/Tc6JKtQcNZhgyCL3aKx1wevs8T7X/nCeTToArsQ==}
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
'@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vue: 3.4.15(typescript@5.3.3)
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-shared: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2)
transitivePeerDependencies:
- '@vue/composition-api'
- typescript
dev: false
/vuepress-plugin-sass-palette@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-fwhCSarn19JO8xGR+AIRsFkRVrbwOqjKwUB9XmTdTLqKCT5onvBZkjBrd2b47Zs+BhySL5nsuIW4H2tDwfFqBw==}
/vuepress-plugin-sass-palette@2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-DYmHANdKkz+jwAU7dpP72NYjPGOpWrY/2eTs4NPDDBNKELcav5W6oDM4T9gPGpk9kncEW8LC4NTS6z2Jkep2Ig==}
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
peerDependencies:
sass-loader: ^14.0.0
@ -15006,48 +15044,23 @@ packages:
sass-loader:
optional: true
dependencies:
'@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
chokidar: 3.5.3
sass: 1.70.0
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
vuepress-shared: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2)
transitivePeerDependencies:
- '@vue/composition-api'
- typescript
dev: false
/vuepress-plugin-seo2@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-WGtoaR98chMiq6C14rmtRNHC9XVS0fSqSOeti6b1k8SjW6ESTmILq5o0vp4Vojc0Qo5DA/nN7Cw0cLaKVVgX8A==}
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
transitivePeerDependencies:
- '@vue/composition-api'
- typescript
dev: false
/vuepress-plugin-sitemap2@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-7hGlrwACCSZijuGFyc4Yh+3IXh8f9dFK0iekjlMbC2TxNbDHHmsLHnsGfEmd6H1xsQtaTC1fwXw158jiXwE1fA==}
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
sitemap: 7.1.1
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)
vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2)
transitivePeerDependencies:
- '@vue/composition-api'
- typescript
dev: false
/vuepress-shared@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-gsiqo9tr6dHCVQTPw1d+oiJyNGzc6nmrGRBWkLb3ZxD15q1k/iv2flBwPdb1RasU827oMgZ2DuOzbHcGjRKjSA==}
/vuepress-shared@2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2):
resolution: {integrity: sha512-oFY8hWYrMQHQMe+YKZvjfzdHK/wvghyhWa4IJuLBwRm6j9AhXOJEAvSzQQKpERkpGS4vZ+pY5tWAodfv2Fhztw==}
engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'}
peerDependencies:
vuepress: 2.0.0-rc.2
dependencies:
'@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2)
'@vueuse/core': 10.7.2(vue@3.4.15)
cheerio: 1.0.0-rc.12
dayjs: 1.11.10
@ -15055,7 +15068,6 @@ packages:
fflate: 0.8.1
gray-matter: 4.0.3
semver: 7.5.4
striptags: 3.2.0
vue: 3.4.15(typescript@5.3.3)
vue-router: 4.2.5(vue@3.4.15)
vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15)

View File

@ -4,6 +4,8 @@
开箱即用,仅需少量配置即可使用,让您更专注于 内容的创作,更好的表达你的想法,形成你的知识笔记。
内置了丰富的强大的功能,旨在让内容更具有表现力。
[![npm version](https://img.shields.io/npm/v/vuepress-theme-plume?color=32A9C3&labelColor=1B3C4A&label=npm)](https://www.npmjs.com/package/vuepress-theme-plume)
[![npm beta download](https://img.shields.io/npm/dt/@vuepress-plume/vuepress-theme-plume?color=32A9C3&labelColor=1B3C4A&label=beta%20downloads)](https://www.npmjs.com/package/vuepress-theme-plume)
[![npm download](https://img.shields.io/npm/dy/vuepress-theme-plume?color=32A9C3&labelColor=1B3C4A&label=downloads)](https://www.npmjs.com/package/vuepress-theme-plume)

View File

@ -65,17 +65,19 @@
"@vuepress-plume/plugin-iconify": "workspace:*",
"@vuepress-plume/plugin-notes-data": "workspace:*",
"@vuepress-plume/plugin-shikiji": "workspace:*",
"@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",
"@vuepress/plugin-active-header-links": "2.0.0-rc.3",
"@vuepress/plugin-container": "2.0.0-rc.3",
"@vuepress/plugin-docsearch": "2.0.0-rc.3",
"@vuepress/plugin-external-link-icon": "2.0.0-rc.3",
"@vuepress/plugin-git": "2.0.0-rc.3",
"@vuepress/plugin-medium-zoom": "2.0.0-rc.3",
"@vuepress/plugin-nprogress": "2.0.0-rc.3",
"@vuepress/plugin-palette": "2.0.0-rc.3",
"@vuepress/plugin-search": "2.0.0-rc.3",
"@vuepress/plugin-seo": "2.0.0-rc.6",
"@vuepress/plugin-sitemap": "2.0.0-rc.6",
"@vuepress/plugin-theme-data": "2.0.0-rc.3",
"@vuepress/plugin-toc": "2.0.0-rc.3",
"@vueuse/core": "^10.7.2",
"date-fns": "^3.3.1",
"katex": "^0.16.9",
@ -83,10 +85,8 @@
"nanoid": "^5.0.4",
"vue": "^3.4.15",
"vue-router": "4.2.5",
"vuepress-plugin-comment2": "2.0.0-rc.16",
"vuepress-plugin-md-enhance": "2.0.0-rc.16",
"vuepress-plugin-reading-time2": "2.0.0-rc.16",
"vuepress-plugin-seo2": "2.0.0-rc.16",
"vuepress-plugin-sitemap2": "2.0.0-rc.16"
"vuepress-plugin-comment2": "2.0.0-rc.18",
"vuepress-plugin-md-enhance": "2.0.0-rc.18",
"vuepress-plugin-reading-time2": "2.0.0-rc.18"
}
}

View File

@ -63,4 +63,36 @@ const { archives } = useArchives()
font-size: 18px;
font-weight: 700;
}
@media (min-width: 768px) {
.archives-wrapper {
padding: 32px 0;
margin-left: 20px;
}
.archives-title {
display: none;
}
.archive {
padding: 20px;
margin-bottom: 24px;
background-color: var(--vp-c-bg);
border-bottom: none;
border-radius: 8px;
box-shadow: var(--vp-shadow-2);
}
.archive-title {
padding-bottom: 10px;
margin-top: 0;
border-bottom: solid 1px var(--vp-c-divider);
}
}
@media (min-width: 960px) {
.archives-wrapper {
margin-left: auto;
}
}
</style>

View File

@ -77,8 +77,8 @@ function handleClick() {
.back-to-top-button {
position: fixed;
inset-inline-end: 1rem;
right: 20px;
bottom: 64px;
right: 24px;
bottom: calc(var(--vp-footer-height, 82px) - 18px);
z-index: var(--vp-z-index-back-to-top);
width: 36px;
height: 36px;
@ -140,6 +140,7 @@ function handleClick() {
@media (min-width: 768px) {
.back-to-top-button {
bottom: calc(var(--vp-footer-height, 88px) - 24px);
width: 48px;
height: 48px;
}

View File

@ -12,16 +12,22 @@ const page = usePageData<PlumeThemePageData>()
<template>
<div class="blog-wrapper">
<PostList v-if="page.type === 'blog'" />
<Tags v-if="page.type === 'blog-tags'" />
<Archives v-if="page.type === 'blog-archives'" />
<BlogAside />
<BlogExtract />
<div class="blog-container">
<PostList v-if="page.type === 'blog'" />
<Tags v-if="page.type === 'blog-tags'" />
<Archives v-if="page.type === 'blog-archives'" />
<BlogAside />
<BlogExtract />
</div>
</div>
</template>
<style scoped>
.blog-wrapper {
min-height: calc(100vh - var(--vp-footer-height, 0px));
}
.blog-container {
display: flex;
align-items: flex-start;
justify-content: flex-start;
@ -30,15 +36,31 @@ const page = usePageData<PlumeThemePageData>()
margin: 0 auto;
}
@media (min-width: 768px) {
.blog-wrapper {
min-height: calc(100vh + var(--vp-nav-height) - var(--vp-footer-height, 0px));
}
.blog-wrapper {
padding-top: var(--vp-nav-height);
margin-top: calc(var(--vp-nav-height) * -1);
background-color: var(--vp-c-bg-alt);
}
}
@media (min-width: 960px) {
.blog-wrapper {
min-height: calc(100vh - var(--vp-footer-height, 0px));
}
.blog-container {
max-width: 784px;
padding-top: 0;
}
}
@media (min-width: 1440px) {
.blog-wrapper {
.blog-container {
max-width: 1104px;
}
}

View File

@ -1,11 +1,14 @@
<script lang="ts" setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import { useBlogExtract, useThemeLocaleData } from '../composables/index.js'
import AutoLink from './AutoLink.vue'
import IconArchive from './icons/IconArchive.vue'
import IconTag from './icons/IconTag.vue'
import IconChevronRight from './icons/IconChevronRight.vue'
const theme = useThemeLocaleData()
const route = useRoute()
const avatar = computed(() => theme.value.avatar)
const { hasBlogExtract, tags, archives } = useBlogExtract()
@ -14,7 +17,7 @@ const { hasBlogExtract, tags, archives } = useBlogExtract()
<template>
<div v-if="avatar" class="blog-aside-wrapper">
<div class="avatar-profile">
<p v-if="avatar.url">
<p v-if="avatar.url" :class="{ circle: avatar.circle }">
<img :src="avatar.url" :alt="avatar.name">
</p>
<div>
@ -23,13 +26,25 @@ const { hasBlogExtract, tags, archives } = useBlogExtract()
</div>
</div>
<div v-if="hasBlogExtract" class="blog-nav">
<AutoLink class="nav-link" :href="tags.link">
<IconTag class="icon" />
<span>{{ tags.text }}</span>
<AutoLink
class="nav-link"
:class="{ active: route.path === tags.link }"
:href="tags.link"
>
<IconTag class="icon icon-logo" />
<span class="text">{{ tags.text }}</span>
<span class="total">{{ tags.total }}</span>
<IconChevronRight class="icon" />
</AutoLink>
<AutoLink class="nav-link" :href="archives.link">
<IconArchive class="icon" />
<span>{{ archives.text }}</span>
<AutoLink
class="nav-link"
:class="{ active: route.path === archives.link }"
:href="archives.link"
>
<IconArchive class="icon icon-logo" />
<span class="text">{{ archives.text }}</span>
<span class="total">{{ archives.total }}</span>
<IconChevronRight class="icon" />
</AutoLink>
</div>
</div>
@ -41,17 +56,15 @@ const { hasBlogExtract, tags, archives } = useBlogExtract()
top: calc(var(--vp-nav-height) + 2rem);
display: none;
width: 270px;
padding: 1rem 0;
margin-top: 2rem;
margin-bottom: 12rem;
margin-left: 2rem;
margin: 2rem 1rem 0 2rem;
text-align: center;
border-left: solid 1px var(--vp-c-divider);
}
.blog-aside-wrapper img {
width: 50%;
width: 60%;
margin: auto;
object-fit: cover;
}
.blog-aside-wrapper h3 {
@ -60,39 +73,74 @@ const { hasBlogExtract, tags, archives } = useBlogExtract()
font-weight: 600;
}
@media (min-width: 768px) {
.blog-aside-wrapper {
display: block;
}
.avatar-profile {
padding: 24px 20px;
margin-bottom: 24px;
background-color: var(--vp-c-bg);
border-radius: 8px;
box-shadow: var(--vp-shadow-2);
}
.avatar-profile .circle img {
overflow: hidden;
border-radius: 50%;
}
.blog-nav {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
padding: 10px 12px 0;
margin: 24px 24px 0;
border-top: solid 1px var(--vp-c-divider);
padding: 0;
text-align: left;
}
.nav-link {
display: flex;
align-items: center;
justify-content: center;
padding: 3px;
font-weight: 600;
color: var(--vp-c-brand-1);
justify-content: flex-start;
padding: 10px 14px 10px 20px;
margin-bottom: 20px;
font-size: 14px;
font-weight: 500;
color: var(--vp-c-text-1);
background-color: var(--vp-c-bg);
border-radius: 8px;
transition: all var(--t-color);
box-shadow: var(--vp-shadow-2);
transition: color var(--t-color);
}
.nav-link:hover {
color: var(--vp-c-brand-2);
.nav-link:hover,
.nav-link.active {
color: var(--vp-c-brand-1);
}
.nav-link .text {
flex: 1;
min-width: 0;
padding-right: 14px;
}
.nav-link .total {
padding-right: 8px;
color: var(--vp-c-text-3);
}
.nav-link .icon {
width: 1em;
height: 1em;
margin-right: 4px;
font-size: 1.2em;
color: var(--vp-c-text-3);
}
.nav-link .icon-logo {
margin-right: 10px;
color: var(--vp-c-brand-1);
}
@media (min-width: 768px) {
.blog-aside-wrapper {
margin: 2rem 1rem 2rem 1.25rem;
}
.blog-aside-wrapper {
display: block;
}
}
</style>

View File

@ -129,7 +129,7 @@ export default {
display: flex;
align-items: center;
height: var(--vp-nav-height);
padding: 0 12px;
padding: 0 10px;
color: var(--vp-c-text-1);
transition: color 0.5s;
}

View File

@ -45,11 +45,18 @@ const list = computed(() => matter.value.list || [])
<style scoped>
.friends-wrapper {
width: 100%;
min-height: calc(100vh - var(--vp-footer-height, 0px));
padding-top: var(--vp-nav-height);
padding-bottom: 5rem;
margin: 0 auto;
}
@media (min-width: 960px) {
.friends-wrapper {
min-height: calc(100vh - var(--vp-nav-height) - var(--vp-footer-height, 0px));
}
}
.friends-wrapper .title {
padding-top: 3rem;
padding-left: 1rem;

View File

@ -32,7 +32,7 @@ const page = usePageData()
.navbar-menu-link {
display: flex;
align-items: center;
padding: 0 12px;
padding: 0 10px;
font-size: 14px;
font-weight: 500;
line-height: var(--vp-nav-height);

View File

@ -5,7 +5,7 @@ import type {
PlumeThemePageData,
PlumeThemePostFrontmatter,
} from '../../shared/index.js'
import { useReadingTime } from '../composables/index.js'
import { useExtraBlogData, useReadingTime } from '../composables/index.js'
import IconBooks from './icons/IconBooks.vue'
import IconClock from './icons/IconClock.vue'
import IconTag from './icons/IconTag.vue'
@ -13,6 +13,7 @@ import IconTag from './icons/IconTag.vue'
const page = usePageData<PlumeThemePageData>()
const matter = usePageFrontmatter<PlumeThemePostFrontmatter>()
const readingTime = useReadingTime()
const extraData = useExtraBlogData()
const createTime = computed(() => {
if (matter.value.createTime)
@ -26,8 +27,12 @@ const categoryList = computed(() => {
})
const tags = computed(() => {
if (matter.value.tags)
return matter.value.tags.slice(0, 4)
if (matter.value.tags) {
return matter.value.tags.slice(0, 4).map(tag => ({
name: tag,
colors: extraData.value.tagsColorsPreset[extraData.value.tagsColors[tag]],
}))
}
return []
})
@ -59,9 +64,13 @@ const hasMeta = computed(() => readingTime.value.times || tags.value.length || c
</p>
<p v-if="tags.length > 0">
<IconTag class="icon" />
<span v-for="(tag, index) in tags" :key="tag" class="tag">
{{ tag }}
<template v-if="index < tags.length - 1">,</template>
<span
v-for="tag in tags"
:key="tag.name"
class="tag"
:style="{ '--vp-tag-color': tag.colors[0], '--vp-tag-bg-color': tag.colors[2] }"
>
{{ tag.name }}
</span>
</p>
<p v-if="createTime" class="create-time">
@ -129,11 +138,12 @@ const hasMeta = computed(() => readingTime.value.times || tags.value.length || c
.page-meta-wrapper .tag {
display: inline-block;
padding: 3px;
padding: 3px 5px;
margin-right: 6px;
line-height: 1;
color: var(--vp-c-text-2);
background-color: var(--vp-c-mute);
border-radius: 4px;
color: var(--vp-tag-color);
background-color: var(--vp-tag-bg-color);
border-radius: 3px;
}
.page-meta-wrapper .tag:last-of-type {

View File

@ -1,6 +1,7 @@
<script lang="ts" setup>
import { computed } from 'vue'
import type { PlumeThemeBlogPostItem } from '../../shared/index.js'
import { useExtraBlogData } from '../composables/index.js'
import AutoLink from './AutoLink.vue'
import IconClock from './icons/IconClock.vue'
import IconFolder from './icons/IconFolder.vue'
@ -10,12 +11,19 @@ const props = defineProps<{
post: PlumeThemeBlogPostItem
}>()
const extraData = useExtraBlogData()
const categoryList = computed(() =>
props.post.categoryList ?? [],
)
const tags = computed(() =>
(props.post.tags ?? []).slice(0, 4),
(props.post.tags ?? [])
.slice(0, 4)
.map(tag => ({
name: tag,
colors: extraData.value.tagsColorsPreset[extraData.value.tagsColors[tag]],
})),
)
const createTime = computed(() =>
@ -46,9 +54,13 @@ const createTime = computed(() =>
</div>
<div v-if="tags.length" class="tag-list">
<IconTag class="icon" />
<template v-for="(tag, i) in tags" :key="tag">
<span class="tag">{{ tag }}</span>
<span v-if="i !== tags.length - 1">,</span>
<template v-for="tag in tags" :key="tag.name">
<span
class="tag"
:style="{ '--vp-tag-color': tag.colors[0], '--vp-tag-bg-color': tag.colors[2] }"
>
{{ tag.name }}
</span>
</template>
</div>
<div v-if="createTime" class="create-time">
@ -99,7 +111,21 @@ const createTime = computed(() =>
color: var(--vp-c-text-2);
}
@media (min-width: 768px) {
.post-item {
padding: 24px 20px;
margin: 0 0 24px 20px;
background-color: var(--vp-c-bg);
border-radius: 8px;
box-shadow: var(--vp-shadow-2);
}
}
@media (min-width: 960px) {
.post-item {
margin-left: 0;
}
.post-item h3 {
font-size: 20px;
}
@ -133,7 +159,17 @@ const createTime = computed(() =>
}
.post-meta .tag-list .tag {
margin: 0 0.2rem;
display: inline-block;
padding: 3px 5px;
margin-right: 6px;
line-height: 1;
color: var(--vp-tag-color);
background-color: var(--vp-tag-bg-color);
border-radius: 3px;
}
.post-meta .tag-list .tag:last-of-type {
margin-right: 0;
}
.post-meta .icon {

View File

@ -65,6 +65,7 @@ const {
padding: 0 4px;
font-weight: 500;
color: var(--vp-c-brand-1);
background-color: var(--vp-c-bg);
border: 1px solid var(--vp-c-brand-1);
border-radius: 4px;
transition: all var(--t-color);

View File

@ -9,29 +9,33 @@ const { tags: tagsLink } = useBlogExtract()
<template>
<div class="tags-wrapper" :class="{ 'has-list': postList.length > 0 }">
<h2 class="tags-title">
<IconTag class="icon" />
<span>{{ tagsLink.text }}</span>
</h2>
<div class="tags">
<p
v-for="tag in tags"
:key="tag.name"
class="tag"
:class="{ active: tag.name === currentTag }"
:style="{ '--vp-tag-color': tag.color }"
@click="handleTagClick(tag.name)"
>
<span class="tag-name">{{ tag.name }}</span>
<span class="tag-count">{{ tag.count }}</span>
</p>
<div class="tags-nav">
<h2 class="tags-title">
<IconTag class="icon" />
<span>{{ tagsLink.text }}</span>
</h2>
<div class="tags">
<p
v-for="tag in tags"
:key="tag.name"
class="tag"
:class="{ active: tag.name === currentTag }"
:style="{ '--vp-tag-color': tag.colors[0], '--vp-tag-hover-color': tag.colors[1] }"
@click="handleTagClick(tag.name)"
>
<span class="tag-name">{{ tag.name }}</span>
<span class="tag-count">{{ tag.count }}</span>
</p>
</div>
</div>
<h3 v-if="currentTag" class="tag-title">
{{ currentTag }}
</h3>
<div v-if="currentTag" class="tags-container">
<h3 class="tag-title">
{{ currentTag }}
</h3>
<ShortPostList v-if="postList.length" :post-list="postList" />
<ShortPostList v-if="postList.length" :post-list="postList" />
</div>
</div>
</template>
@ -39,7 +43,7 @@ const { tags: tagsLink } = useBlogExtract()
.tags-wrapper {
flex: 1;
max-width: 768px;
padding: 32px 24px 168px;
padding: 32px 24px;
margin: 0 auto;
}
@ -53,7 +57,7 @@ const { tags: tagsLink } = useBlogExtract()
margin-bottom: 20px;
font-size: 20px;
font-weight: 700;
color: var(--vp-c-brand-1);
color: var(--vp-c-text-1);
}
.tags-title .icon {
@ -72,14 +76,16 @@ const { tags: tagsLink } = useBlogExtract()
.tags .tag {
display: flex;
align-items: center;
padding: 6px 6px 6px 10px;
margin: 8px;
padding: 6px 10px 6px 12px;
margin: 6px;
font-size: 14px;
line-height: 1;
color: var(--vp-tag-color);
color: var(--vp-c-bg);
word-wrap: break-word;
cursor: pointer;
background-color: var(--vp-tag-color);
border: solid 1px var(--vp-tag-color);
border-radius: 4px;
border-radius: 6px;
transition: all var(--t-color);
}
@ -95,20 +101,50 @@ const { tags: tagsLink } = useBlogExtract()
display: inline-block;
padding-left: 6px;
margin-left: 4px;
color: var(--vp-tag-color);
border-left: 1px solid var(--vp-tag-color);
color: var(--vp-c-bg);
border-left: 1px solid var(--vp-c-bg);
transition: all var(--t-color);
}
.tags .tag:hover,
.tags .tag.active {
color: var(--vp-c-bg);
background-color: var(--vp-tag-color);
background-color: var(--vp-tag-hover-color);
}
.tags .tag:hover .tag-count,
.tags .tag.active .tag-count {
color: var(--vp-bg);
color: var(--vp-c-bg);
border-left-color: var(--vp-c-divider);
}
@media (min-width: 768px) {
.tags-wrapper {
padding: 32px 0;
margin-left: 20px;
}
.tags-nav,
.tags-container {
padding: 20px;
background-color: var(--vp-c-bg);
border-radius: 8px;
box-shadow: var(--vp-shadow-2);
}
.tags-container {
margin-top: 24px;
margin-bottom: 24px;
}
.tags-container .tag-title {
margin-top: 0;
}
}
@media (min-width: 960px) {
.tags-wrapper {
margin-left: auto;
}
}
</style>

View File

@ -1,14 +1,25 @@
<script setup lang="ts">
import { useCssVar } from '@vueuse/core'
import { onMounted, ref } from 'vue'
import { useSidebar, useThemeLocaleData } from '../composables/index.js'
import { inBrowser } from '../utils/index.js'
const theme = useThemeLocaleData()
const { hasSidebar } = useSidebar()
const footerHeight = useCssVar('--vp-footer-height', inBrowser ? document.body : null)
const footer = ref<HTMLElement | null>(null)
onMounted(() => {
if (theme.value.footer && footer.value)
footerHeight.value = `${footer.value.offsetHeight}px`
})
</script>
<template>
<!-- eslint-disable vue/no-v-html -->
<footer
v-if="theme.footer"
ref="footer"
class="plume-footer"
:class="{ 'has-sidebar': hasSidebar }"
>
@ -37,10 +48,6 @@ const { hasSidebar } = useSidebar()
transition: all 0.25s;
}
.plume-footer.has-sidebar {
display: none;
}
.plume-footer :deep(a) {
text-decoration-line: underline;
text-underline-offset: 2px;

View File

@ -7,6 +7,7 @@
>
<path
d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"
fill="currentColor"
/>
</svg>
</template>

View File

@ -1,9 +1,16 @@
import { usePageLang } from 'vuepress/client'
import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client'
import { computed } from 'vue'
import { useExtraBlogData as _useExtraBlogData, useBlogPostData } from '@vuepress-plume/plugin-blog-data/client'
import { type Ref, computed } from 'vue'
import type { PlumeThemeBlogPostItem } from '../../shared/index.js'
import { useLocaleLink, useRouteQuery, useThemeLocaleData } from '../composables/index.js'
import { getRandomColor, toArray } from '../utils/index.js'
import { toArray } from '../utils/index.js'
export const useExtraBlogData = _useExtraBlogData as () => Ref<{
tagsColorsPreset: (readonly [string, string, string])[]
tagsColors: Record<string, number>
}>
const DEFAULT_PER_PAGE = 10
export function useLocalePostList() {
const locale = usePageLang()
@ -49,7 +56,7 @@ export function usePostListControl() {
const totalPage = computed(() => {
if (blog.value.pagination === false)
return 0
const perPage = blog.value.pagination?.perPage || 20
const perPage = blog.value.pagination?.perPage || DEFAULT_PER_PAGE
return Math.ceil(postList.value.length / perPage)
})
const isLastPage = computed(() => page.value >= totalPage.value)
@ -60,7 +67,7 @@ export function usePostListControl() {
if (blog.value.pagination === false)
return postList.value
const perPage = blog.value.pagination?.perPage || 20
const perPage = blog.value.pagination?.perPage || DEFAULT_PER_PAGE
if (postList.value.length <= perPage)
return postList.value
@ -96,6 +103,8 @@ const extractLocales: Record<string, { tags: string, archives: string }> = {
export function useBlogExtract() {
const theme = useThemeLocaleData()
const locale = usePageLang()
const postList = useLocalePostList()
const { tags: tagsList } = useTags()
const hasBlogExtract = computed(() => theme.value.blog?.archives !== false || theme.value.blog?.tags !== false)
const tagsLink = useLocaleLink('blog/tags/')
@ -104,11 +113,13 @@ export function useBlogExtract() {
const tags = computed(() => ({
link: tagsLink.value,
text: extractLocales[locale.value]?.tags || extractLocales.en.tags,
total: tagsList.value.length,
}))
const archives = computed(() => ({
link: archiveLink.value,
text: extractLocales[locale.value]?.archives || extractLocales.en.archives,
total: postList.value.length,
}))
return {
@ -122,6 +133,9 @@ export type ShortPostItem = Pick<PlumeThemeBlogPostItem, 'title' | 'path' | 'cre
export function useTags() {
const list = useLocalePostList()
const extraData = useExtraBlogData()
const tags = computed(() => {
const tagMap: Record<string, number> = {}
list.value.forEach((item) => {
@ -137,7 +151,7 @@ export function useTags() {
return Object.keys(tagMap).map(tag => ({
name: tag,
count: tagMap[tag] > 99 ? '99+' : tagMap[tag],
color: getRandomColor(),
colors: extraData.value.tagsColorsPreset[extraData.value.tagsColors[tag]],
}))
})

View File

@ -17,13 +17,13 @@ export const readingTimeLocales = {
'zh-CN': {
word: '约$word字',
less1Minute: '小于1分钟',
time: '约$time分钟',
time: '约$time分钟',
},
'zh-TW': {
word: '約$word字',
less1Minute: '小於1分鐘',
time: '约$time分鐘',
time: '约$time分鐘',
},
'de': {

View File

@ -273,7 +273,6 @@
"Liberation Mono",
"Courier New",
monospace;
--vp-header-anchor-symbol: "#";
}
/**

View File

@ -5,4 +5,3 @@ export * from './dom.js'
export * from './resolveEditLink.js'
export * from './resolveRepoType.js'
export * from './base.js'
export * from './color.js'

View File

@ -0,0 +1,40 @@
import { hasOwn, random, toArray } from '@pengzhanbo/utils'
export type BlogTagsColorsItem = readonly [
string, // normal color
string, // hover color
string, // background color
]
export const BLOG_TAGS_COLORS_PRESET: BlogTagsColorsItem[] = [
['#6aa1b7', '#5086a1', 'rgba(131, 208, 218, 0.314)'],
['#299764', '#18794e', 'rgba(16, 185, 129, 0.14)'],
['#946300', '#915930', 'rgba(234, 179, 8, 0.14)'],
['#d5393e', '#b8272c', 'rgba(244, 63, 94, 0.14)'],
['#7e4cc9', '#6f42c1', 'rgba(159, 122, 234, 0.14)'],
['#3a5ccc', '#3451b2', 'rgba(100, 108, 255, 0.14)'],
['#f1c40f', '#f39c12', 'rgba(255, 213, 0, 0.14)'],
['#cc6699', '#c75191', 'rgba(255, 153, 204, 0.14)'],
]
const len = BLOG_TAGS_COLORS_PRESET.length
let prevIndex: number[] = []
function getRandom() {
let index: number
do
index = random(0, len - 1)
while (prevIndex.includes(index))
prevIndex.push(index)
prevIndex = prevIndex.slice(-5)
return index
}
export function generateBlogTagsColors(map: Record<string, any>, tags?: string[]) {
if (!tags || tags.length === 0)
return
toArray(tags).forEach((tag) => {
if (!hasOwn(map, tag))
map[tag] = getRandom()
})
}

View File

@ -15,12 +15,12 @@ import { caniusePlugin } from '@vuepress-plume/plugin-caniuse'
import { copyCodePlugin } from '@vuepress-plume/plugin-copy-code'
import { iconifyPlugin } from '@vuepress-plume/plugin-iconify'
import { notesDataPlugin } from '@vuepress-plume/plugin-notes-data'
import { shikijiPlugin } from '@vuepress-plume/plugin-shikiji'
import { shikiPlugin } from '@vuepress-plume/plugin-shikiji'
import { commentPlugin } from 'vuepress-plugin-comment2'
import { type MarkdownEnhanceOptions, mdEnhancePlugin } from 'vuepress-plugin-md-enhance'
import { readingTimePlugin } from 'vuepress-plugin-reading-time2'
import { seoPlugin } from 'vuepress-plugin-seo2'
import { sitemapPlugin } from 'vuepress-plugin-sitemap2'
import { seoPlugin } from '@vuepress/plugin-seo'
import { sitemapPlugin } from '@vuepress/plugin-sitemap'
import { contentUpdatePlugin } from '@vuepress-plume/plugin-content-update'
import type {
PlumeThemeLocaleOptions,
@ -32,6 +32,7 @@ import { pathJoin } from './utils.js'
import { resolveNotesList } from './resolveNotesList.js'
import { resolvedDocsearchOption, resolvedSearchOptions } from './searchPluginOptions.js'
import { customContainers } from './container.js'
import { BLOG_TAGS_COLORS_PRESET, generateBlogTagsColors } from './blogTags.js'
export function setupPlugins(
app: App,
@ -68,13 +69,21 @@ export function setupPlugins(
pageFilter: (page: any) => page.frontmatter.article !== undefined
? !!page.frontmatter.article
: true,
extendBlogData: (page: any) => ({
categoryList: page.data.categoryList,
tags: page.frontmatter.tags,
sticky: page.frontmatter.sticky,
createTime: page.data.frontmatter.createTime,
lang: page.lang,
}),
extraBlogData(extra) {
extra.tagsColorsPreset = BLOG_TAGS_COLORS_PRESET
extra.tagsColors = {}
},
extendBlogData: (page: any, extra) => {
const tags = page.frontmatter.tags
generateBlogTagsColors(extra.tagsColors, tags)
return {
categoryList: page.data.categoryList,
tags,
sticky: page.frontmatter.sticky,
createTime: page.data.frontmatter.createTime,
lang: page.lang,
}
},
}),
notesDataPlugin(notesList),
@ -144,10 +153,11 @@ export function setupPlugins(
plugins.push(searchPlugin(resolvedSearchOptions(app, options.search)))
}
if (options.shikiji !== false) {
plugins.push(shikijiPlugin({
const shikiOption = options.shiki || options.shikiji
if (shikiOption !== false) {
plugins.push(shikiPlugin({
theme: { light: 'vitesse-light', dark: 'vitesse-dark' },
...(options.shikiji ?? {}),
...(shikiOption ?? {}),
}))
}

View File

@ -15,6 +15,10 @@ export interface PlumeThemeAvatar {
*
*/
description?: string
/**
*
*/
circle?: boolean
}
export interface SocialLink {

View File

@ -4,7 +4,7 @@ import type { AutoFrontmatterOptions } from '@vuepress-plume/plugin-auto-frontma
import type { BaiduTongjiOptions } from '@vuepress-plume/plugin-baidu-tongji'
import type { CanIUsePluginOptions } from '@vuepress-plume/plugin-caniuse'
import type { CopyCodeOptions } from '@vuepress-plume/plugin-copy-code'
import type { ShikijiPluginOptions } from '@vuepress-plume/plugin-shikiji'
import type { ShikiPluginOptions } from '@vuepress-plume/plugin-shikiji'
import type { CommentPluginOptions } from 'vuepress-plugin-comment2'
import type { MarkdownEnhanceOptions } from 'vuepress-plugin-md-enhance'
import type { ReadingTimeOptions } from 'vuepress-plugin-reading-time2'
@ -31,9 +31,15 @@ export interface PlumeThemePluginOptions {
docsearch?: false | DocsearchOptions
/**
* @deprecated move to `shiki`
*
*/
shikiji?: false | ShikijiPluginOptions
shikiji?: false | ShikiPluginOptions
/**
*
*/
shiki?: false | ShikiPluginOptions
/**
* git