-
-
-
-
-
-
{{ avatar.name }}
-
- {{ avatar.description }}
-
+
+
+
+
+
+
+
+
+
+
+
{{ avatar.name }}
+
+ {{ avatar.description }}
+
+
+
+
+
+
+ {{ tags.text }}
+
+
+
+ {{ archives.text }}
+
+
-
-
-
- {{ tags.text }}
-
-
-
- {{ archives.text }}
-
-
-
-
+
+
diff --git a/theme/src/client/components/ShortPostList.vue b/theme/src/client/components/ShortPostList.vue
index 70370001..51bb5568 100644
--- a/theme/src/client/components/ShortPostList.vue
+++ b/theme/src/client/components/ShortPostList.vue
@@ -11,14 +11,16 @@ defineProps<{
-
-
-
- {{ post.title }}
-
+
+ -
+
+
+ {{ post.title }}
+
+
{{ post.createTime }}
-
-
+
+
diff --git a/theme/src/client/components/Tags.vue b/theme/src/client/components/Tags.vue
index 18300f41..ae64dc71 100644
--- a/theme/src/client/components/Tags.vue
+++ b/theme/src/client/components/Tags.vue
@@ -8,7 +8,7 @@ const { tags: tagsLink } = useBlogExtract()
-
diff --git a/theme/src/client/components/Toc.ts b/theme/src/client/components/Toc.ts
deleted file mode 100644
index e71fcaa6..00000000
--- a/theme/src/client/components/Toc.ts
+++ /dev/null
@@ -1,139 +0,0 @@
-import { usePageData } from '@vuepress/client'
-import type { PageHeader } from '@vuepress/client'
-import type { PropType, VNode } from 'vue'
-import { computed, defineComponent, h, toRefs } from 'vue'
-import type { RouteLocationNormalizedLoaded } from 'vue-router'
-import { useRoute } from 'vue-router'
-import { scrollTo } from '../utils/index.js'
-
-export type TocPropsHeaders = PageHeader[]
-
-export interface TocPropsOptions {
- containerTag: string
- containerClass: string
- listClass: string
- itemClass: string
- linkClass: string
- linkActiveClass: string
- linkChildrenActiveClass: string
-}
-
-export interface TocProps {
- headers: TocPropsHeaders
- options: TocPropsOptions
-}
-
-function renderLink(header: PageHeader, options: TocPropsOptions, route: RouteLocationNormalizedLoaded): VNode {
- const hash = `#${header.slug}`
- const linkClass = [options.linkClass]
-
- if (options.linkActiveClass && route.hash === hash)
- linkClass.push(options.linkActiveClass)
-
- if (
- options.linkChildrenActiveClass
- && header.children.some(item => `#${item.slug}` === route.hash)
- )
- linkClass.push(options.linkChildrenActiveClass)
-
- const setActiveRouteHash = (): void => {
- const headerAnchors: HTMLAnchorElement[] = Array.from(
- document.querySelectorAll('.header-anchor'),
- )
- const anchor = headerAnchors.find(
- anchor => decodeURI(anchor.hash) === hash,
- )
- if (!anchor)
- return
- const el = document.documentElement
- const top = anchor.getBoundingClientRect().top - 80 + el.scrollTop
- scrollTo(document, top)
- }
-
- return h(
- 'a',
- {
- href: hash,
- class: linkClass,
- ariaLabel: header.title,
- onClick: (e: MouseEvent) => {
- e.preventDefault()
- setActiveRouteHash()
- },
- },
- header.title,
- )
-}
-
-function renderHeaders(headers: PageHeader[], options: TocPropsOptions, route: RouteLocationNormalizedLoaded): VNode[] {
- if (headers.length === 0)
- return []
-
- return [
- h(
- 'ul',
- { class: options.listClass },
- headers.map(header =>
- h('li', { class: options.itemClass }, [
- renderLink(header, options, route),
- renderHeaders(header.children, options, route),
- ]),
- ),
- ),
- ]
-}
-
-const Toc = defineComponent({
- name: 'Toc',
- props: {
- headers: {
- type: Array as PropType
,
- required: false,
- default: null,
- },
- options: {
- type: Object as PropType,
- required: false,
- default: () => ({}),
- },
- },
- setup(props) {
- const { headers: propsHeaders, options: propsOptions } = toRefs(props)
-
- const defaultOptions: TocPropsOptions = {
- containerTag: 'nav',
- containerClass: 'theme-plume-toc',
- listClass: 'theme-plume-toc-list',
- itemClass: 'theme-plume-toc-item',
- linkClass: 'theme-plume-toc-link',
- linkActiveClass: 'active',
- linkChildrenActiveClass: 'active',
- }
-
- const route = useRoute()
- const page = usePageData()
- const headers = computed(() => {
- const headerToUse = propsHeaders.value || page.value.headers
-
- return headerToUse[0]?.level === 1 ? headerToUse[0].children : headerToUse
- })
- const options = computed(() => ({
- ...defaultOptions,
- ...propsOptions.value,
- }))
-
- return () => {
- const renderedHeaders = renderHeaders(headers.value, options.value, route)
- if (options.value.containerTag) {
- return h(
- options.value.containerTag,
- { class: options.value.containerClass },
- renderedHeaders,
- )
- }
- return renderedHeaders
- }
- },
-})
-
-export default Toc
diff --git a/theme/src/client/components/VFooter.vue b/theme/src/client/components/VFooter.vue
index 44a5ce31..4c6009ff 100644
--- a/theme/src/client/components/VFooter.vue
+++ b/theme/src/client/components/VFooter.vue
@@ -44,11 +44,12 @@ const { hasSidebar } = useSidebar()
.plume-footer :deep(a) {
text-decoration-line: underline;
text-underline-offset: 2px;
- transition: color 0.25s;
+ transition: color, text-underline-offset 0.25s;
}
.plume-footer :deep(a:hover) {
color: var(--vp-c-text-1);
+ text-underline-offset: 4px;
}
@media (min-width: 768px) {
diff --git a/theme/src/client/composables/blog.ts b/theme/src/client/composables/blog.ts
index ae0e1309..1d6789a6 100644
--- a/theme/src/client/composables/blog.ts
+++ b/theme/src/client/composables/blog.ts
@@ -146,7 +146,7 @@ export function useTags() {
}).map(item => ({
title: item.title,
path: item.path,
- createTime: item.createTime.split(' ')[0],
+ createTime: item.createTime.split(' ')[0].replace(/\//g, '-'),
}))
}
@@ -178,7 +178,7 @@ export function useArchives() {
current.list.push({
title: item.title,
path: item.path,
- createTime: createTime.slice(year.length + 1),
+ createTime: createTime.slice(year.length + 1).replace(/\//g, '-'),
})
})
diff --git a/theme/src/client/config.ts b/theme/src/client/config.ts
index e08aa266..c4549fa2 100644
--- a/theme/src/client/config.ts
+++ b/theme/src/client/config.ts
@@ -11,8 +11,10 @@ import NotFound from './layouts/NotFound.vue'
export default defineClientConfig({
enhance({ app, router }) {
// global component
-
app.component('Badge', Badge)
+
+ if (app._context.components.ExternalLinkIcon)
+ delete app._context.components.ExternalLinkIcon
app.component('ExternalLinkIcon', ExternalLinkIcon)
app.component('DocSearch', () => {
diff --git a/theme/src/node/autoFrontmatter.ts b/theme/src/node/autoFrontmatter.ts
index a7411f69..b042c525 100644
--- a/theme/src/node/autoFrontmatter.ts
+++ b/theme/src/node/autoFrontmatter.ts
@@ -1,6 +1,4 @@
-import fs from 'node:fs'
import path from 'node:path'
-import process from 'node:process'
import type { App } from '@vuepress/core'
import { resolveLocalePath } from '@vuepress/shared'
import type {
@@ -8,28 +6,13 @@ import type {
FrontmatterArray,
FrontmatterObject,
} from '@vuepress-plume/plugin-auto-frontmatter'
-import type { NotesItem } from '@vuepress-plume/plugin-notes-data'
import { format } from 'date-fns'
-import { customAlphabet } from 'nanoid'
+import { uniq } from '@pengzhanbo/utils'
import type {
PlumeThemeLocaleOptions,
PlumeThemePluginOptions,
} from '../shared/index.js'
-
-const nanoid = customAlphabet('0123456789abcdefghijklmnopqrstuvwxyz', 8)
-function getPackage() {
- let pkg = {} as any
- try {
- const content = fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf-8')
- pkg = JSON.parse(content)
- }
- catch {}
- return pkg
-}
-
-function normalizePath(dir: string) {
- return dir.replace(/\\+/g, '/')
-}
+import { getCurrentDirname, getPackage, nanoid, pathJoin } from './utils.js'
export default function autoFrontmatter(
app: App,
@@ -38,17 +21,17 @@ export default function autoFrontmatter(
): AutoFrontmatterOptions {
const sourceDir = app.dir.source()
const pkg = getPackage()
- const articlePrefix = localeOption.article || '/article/'
+ const { locales = {}, avatar, article: articlePrefix = '/article/' } = localeOption
+ const { frontmatter } = options
- const locales = (app.siteData.locales || {}) as PlumeThemeLocaleOptions
- const localesNotesDirs = Object.keys(locales)
+ const localesNotesDirs = Object.keys(app.siteData.locales || {})
.map((locale) => {
// fixed: #15
- const notes = localeOption.locales?.[locale]?.notes
+ const notes = locales[locale]?.notes
if (!notes)
return ''
- const dir = notes.dir
- return dir ? normalizePath(path.join(locale, dir)).replace(/^\//, '') : ''
+
+ return notes.dir ? pathJoin(locale, notes.dir).replace(/^\//, '') : ''
})
.filter(Boolean)
@@ -58,7 +41,7 @@ export default function autoFrontmatter(
return author
if (data.friends)
return
- return localeOption.avatar?.name || pkg.author || ''
+ return avatar?.name || pkg.author || ''
},
createTime(formatTime: string, { createTime }, data: any) {
if (formatTime)
@@ -70,20 +53,20 @@ export default function autoFrontmatter(
}
const resolveLocale = (filepath: string) => {
- const file = normalizePath(
- path.join('/', path.relative(sourceDir, filepath)),
- )
+ const file = pathJoin('/', path.relative(sourceDir, filepath))
+
return resolveLocalePath(localeOption.locales!, file)
}
const notesByLocale = (locale: string) => {
- const notes = localeOption.locales![locale]?.notes || localeOption.notes
+ const notes = locales[locale]?.notes || localeOption.notes
if (notes === false)
return undefined
return notes
}
+
const findNote = (filepath: string) => {
- const file = path.join('/', path.relative(sourceDir, filepath))
- const locale = resolveLocalePath(localeOption.locales!, normalizePath(file))
+ const file = pathJoin('/', path.relative(sourceDir, filepath))
+ const locale = resolveLocalePath(locales, file)
const notes = notesByLocale(locale)
if (!notes)
return undefined
@@ -94,22 +77,15 @@ export default function autoFrontmatter(
)
}
- const getCurrentDirname = (note: NotesItem | undefined, filepath: string) => {
- const dirList = normalizePath(note?.dir || path.dirname(filepath))
- .replace(/^\/|\/$/g, '')
- .split('/')
- return dirList.length > 0 ? dirList[dirList.length - 1] : ''
- }
return {
- include: options.frontmatter?.include ?? ['**/*.md'],
- exclude: options.frontmatter?.exclude ?? ['.vuepress/**/*', 'node_modules'],
- frontmatter: options.frontmatter?.frontmatter ?? [
+ include: frontmatter?.include ?? ['**/*.md'],
+ exclude: uniq(['.vuepress/**/*', 'node_modules', ...(frontmatter?.exclude ?? [])]),
+
+ frontmatter: [
localesNotesDirs.length
? {
// note 首页链接
- include: localesNotesDirs.map(dir =>
- normalizePath(path.join(dir, '**/{readme,README,index}.md')),
- ),
+ include: localesNotesDirs.map(dir => pathJoin(dir, '**/{readme,README,index}.md')),
frontmatter: {
title(title: string, { filepath }) {
if (title)
@@ -117,7 +93,7 @@ export default function autoFrontmatter(
const note = findNote(filepath)
if (note?.text)
return note.text
- return getCurrentDirname(note, filepath) || ''
+ return getCurrentDirname(note?.dir, filepath) || ''
},
...baseFrontmatter,
permalink(permalink: string, { filepath }, data: any) {
@@ -128,13 +104,11 @@ export default function autoFrontmatter(
const locale = resolveLocale(filepath)
const notes = notesByLocale(locale)
const note = findNote(filepath)
- return normalizePath(
- path.join(
- locale,
- notes?.link || '',
- note?.link || getCurrentDirname(note, filepath),
- '/',
- ),
+ return pathJoin(
+ locale,
+ notes?.link || '',
+ note?.link || getCurrentDirname(note?.dir, filepath),
+ '/',
)
},
},
@@ -142,9 +116,7 @@ export default function autoFrontmatter(
: '',
localesNotesDirs.length
? {
- include: localesNotesDirs.map(dir =>
- normalizePath(path.join(dir, '**/**.md')),
- ),
+ include: localesNotesDirs.map(dir => pathJoin(dir, '**/**.md')),
frontmatter: {
title(title: string, { filepath }) {
if (title)
@@ -161,14 +133,12 @@ export default function autoFrontmatter(
const locale = resolveLocale(filepath)
const note = findNote(filepath)
const notes = notesByLocale(locale)
- return normalizePath(
- path.join(
- locale,
- notes?.link || '',
- note?.link || getCurrentDirname(note, filepath),
- nanoid(),
- '/',
- ),
+ return pathJoin(
+ locale,
+ notes?.link || '',
+ note?.link || getCurrentDirname(note?.dir, filepath),
+ nanoid(),
+ '/',
)
},
},
@@ -192,9 +162,7 @@ export default function autoFrontmatter(
if (permalink)
return permalink
const locale = resolveLocale(filepath)
- return normalizePath(
- path.join(locale, articlePrefix, nanoid(), '/'),
- )
+ return pathJoin(locale, articlePrefix, nanoid(), '/')
},
},
},
diff --git a/theme/src/node/plugins.ts b/theme/src/node/plugins.ts
index 99dc5aa1..e30d7311 100644
--- a/theme/src/node/plugins.ts
+++ b/theme/src/node/plugins.ts
@@ -18,10 +18,11 @@ import { iconifyPlugin } from '@vuepress-plume/plugin-iconify'
import { notesDataPlugin } from '@vuepress-plume/plugin-notes-data'
import { shikijiPlugin } from '@vuepress-plume/plugin-shikiji'
import { commentPlugin } from 'vuepress-plugin-comment2'
-import { mdEnhancePlugin } from 'vuepress-plugin-md-enhance'
-import { useReadingTimePlugin } from 'vuepress-plugin-reading-time2'
+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 { contentUpdatePlugin } from '@vuepress-plume/plugin-content-update'
import type {
PlumeThemeLocaleOptions,
PlumeThemePluginOptions,
@@ -41,10 +42,7 @@ export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeO
})
.filter(Boolean)
- if (options.readingTime !== false)
- useReadingTimePlugin(app, options.readingTime || {}, true)
-
- return [
+ const plugins: PluginConfig = [
palettePlugin({ preset: 'sass' }),
themeDataPlugin({
@@ -55,6 +53,7 @@ export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeO
: undefined,
} as any,
}),
+
autoFrontmatterPlugin(autoFrontmatter(app, options, localeOptions)),
blogDataPlugin({
@@ -85,113 +84,134 @@ export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeO
},
}),
- localeOptions.notes ? notesDataPlugin(localeOptions.notes) : [],
-
iconifyPlugin(),
+ contentUpdatePlugin(),
+
activeHeaderLinksPlugin({
headerLinkSelector: 'a.outline-link',
headerAnchorSelector: '.header-anchor',
delay: 200,
offset: 20,
}),
-
- options.nprogress !== false ? nprogressPlugin() : [],
-
- options.git !== false
- ? gitPlugin({
- createdTime: false,
- updatedTime: localeOptions.lastUpdated !== false,
- contributors: localeOptions.contributors !== false,
- })
- : [],
-
- options.mediumZoom !== false
- ? mediumZoomPlugin({
- selector: '.plume-content > img, .plume-content :not(a) > img',
- zoomOptions: {
- background: 'var(--vp-c-bg)',
- },
- delay: 300,
- })
- : [],
-
- options.caniuse !== false
- ? caniusePlugin(
- options.caniuse || {
- mode: 'embed',
- },
- )
- : [],
-
- options.externalLinkIcon !== false
- ? externalLinkIconPlugin({
- locales: Object.entries(localeOptions.locales || {}).reduce(
- (result: Record, [key, value]) => {
- result[key] = {
- openInNewWindow:
- value.openInNewWindow ?? localeOptions.openInNewWindow,
- }
- return result
- },
- {},
- ),
- })
- : [],
-
- options.search !== false ? searchPlugin(options.search) : [],
- options.docsearch !== false && !options.search
- ? docsearchPlugin(options.docsearch!)
- : [],
-
- options.shikiji !== false
- ? shikijiPlugin({
- theme: { light: 'vitesse-light', dark: 'vitesse-dark' },
- ...(options.shikiji ?? {}),
- })
- : [],
-
- options.copyCode !== false
- ? copyCodePlugin({
- selector: '.plume-content div[class*="language-"] pre',
- ...options.copyCode,
- })
- : [],
-
- options.markdownEnhance !== false
- ? mdEnhancePlugin(
- Object.assign(
- {
- hint: true, // info note tip warning danger details d
- codetabs: true,
- tabs: true,
- align: true,
- mark: true,
- tasklist: true,
- demo: true,
- attrs: true,
- },
- options.markdownEnhance || {},
- ),
- )
- : [],
-
- options.comment !== false ? commentPlugin(options.comment || {}) : [],
-
- options.baiduTongji !== false && options.baiduTongji?.key
- ? baiduTongjiPlugin(options.baiduTongji)
- : [],
-
- options.sitemap !== false && localeOptions.hostname && isProd
- ? sitemapPlugin({
- hostname: localeOptions.hostname,
- })
- : [],
- options.seo !== false && localeOptions.hostname && isProd
- ? seoPlugin({
- hostname: localeOptions.hostname || '',
- author: localeOptions.avatar?.name,
- })
- : [],
]
+
+ if (options.readingTime !== false)
+ plugins.push(readingTimePlugin(options.readingTime || {}))
+
+ if (localeOptions.notes)
+ plugins.push(notesDataPlugin(localeOptions.notes))
+
+ if (options.nprogress !== false)
+ plugins.push(nprogressPlugin())
+
+ if (options.git !== false) {
+ plugins.push(gitPlugin({
+ createdTime: false,
+ updatedTime: localeOptions.lastUpdated !== false,
+ contributors: localeOptions.contributors !== false,
+ }))
+ }
+
+ if (options.mediumZoom !== false) {
+ plugins.push(mediumZoomPlugin({
+ selector: '.plume-content > img, .plume-content :not(a) > img',
+ zoomOptions: {
+ background: 'var(--vp-c-bg)',
+ },
+ delay: 300,
+ }))
+ }
+
+ if (options.caniuse !== false) {
+ plugins.push(caniusePlugin(
+ options.caniuse || {
+ mode: 'embed',
+ },
+ ))
+ }
+
+ if (options.externalLinkIcon !== false) {
+ plugins.push(externalLinkIconPlugin({
+ locales: Object.entries(localeOptions.locales || {}).reduce(
+ (result: Record, [key, value]) => {
+ result[key] = {
+ openInNewWindow:
+ value.openInNewWindow ?? localeOptions.openInNewWindow,
+ }
+ return result
+ },
+ {},
+ ),
+ }))
+ }
+
+ if (options.search !== false)
+ plugins.push(searchPlugin(options.search))
+
+ if (options.docsearch !== false && !options.search) {
+ if (options.docsearch?.appId && options.docsearch?.apiKey) {
+ plugins.push(docsearchPlugin(options.docsearch))
+ }
+ else {
+ console.error(
+ 'docsearch plugin: appId and apiKey are both required',
+ )
+ }
+ }
+
+ if (options.shikiji !== false) {
+ plugins.push(shikijiPlugin({
+ theme: { light: 'vitesse-light', dark: 'vitesse-dark' },
+ ...(options.shikiji ?? {}),
+ }))
+ }
+
+ if (options.copyCode !== false) {
+ plugins.push(copyCodePlugin({
+ selector: '.plume-content div[class*="language-"] pre',
+ ...options.copyCode,
+ }))
+ }
+
+ if (options.markdownEnhance !== false) {
+ plugins.push(mdEnhancePlugin(
+ Object.assign(
+ {
+ hint: true, // info note tip warning danger details
+ codetabs: true,
+ tabs: true,
+ align: true,
+ mark: true,
+ tasklist: true,
+ demo: true,
+ attrs: true,
+ sup: true,
+ sub: true,
+ } as MarkdownEnhanceOptions,
+ options.markdownEnhance || {},
+ ),
+ ))
+ }
+
+ if (options.comment !== false)
+ plugins.push(commentPlugin(options.comment || {}))
+
+ if (options.baiduTongji !== false && options.baiduTongji?.key)
+ plugins.push(baiduTongjiPlugin(options.baiduTongji))
+
+ if (options.sitemap !== false && localeOptions.hostname && isProd) {
+ plugins.push(sitemapPlugin({
+ hostname: localeOptions.hostname,
+ }))
+ }
+
+ if (options.seo !== false && localeOptions.hostname && isProd) {
+ plugins.push(seoPlugin({
+ hostname: localeOptions.hostname || '',
+ author: localeOptions.avatar?.name,
+ }))
+ }
+
+ return plugins
}
diff --git a/theme/src/node/setupPages.ts b/theme/src/node/setupPages.ts
index fd4d2437..566cbb9a 100644
--- a/theme/src/node/setupPages.ts
+++ b/theme/src/node/setupPages.ts
@@ -6,10 +6,7 @@ import type {
PlumeThemeLocaleOptions,
PlumeThemePageData,
} from '../shared/index.js'
-
-function normalizePath(dir: string) {
- return dir.replace(/\\+/g, '/')
-}
+import { normalizePath } from './utils.js'
export async function setupPage(
app: App,
diff --git a/theme/src/node/theme.ts b/theme/src/node/theme.ts
index a4b05478..27a215ae 100644
--- a/theme/src/node/theme.ts
+++ b/theme/src/node/theme.ts
@@ -23,8 +23,7 @@ export function plumeTheme({
plugins: setupPlugins(app, themePlugins, localeOptions),
onInitialized: async app => await setupPage(app, localeOptions),
extendsPage: (page: Page) =>
- extendsPageData(app, page, localeOptions)
- ,
+ extendsPageData(app, page, localeOptions),
}
}
}
diff --git a/theme/src/node/utils.ts b/theme/src/node/utils.ts
new file mode 100644
index 00000000..dd9abbf9
--- /dev/null
+++ b/theme/src/node/utils.ts
@@ -0,0 +1,33 @@
+import fs from 'node:fs'
+import path from 'node:path'
+import process from 'node:process'
+import { customAlphabet } from 'nanoid'
+
+export const nanoid = customAlphabet('0123456789abcdefghijklmnopqrstuvwxyz', 8)
+
+export function getPackage() {
+ let pkg = {} as any
+ try {
+ const content = fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf-8')
+ pkg = JSON.parse(content)
+ }
+ catch { }
+ return pkg
+}
+
+const RE_SLASH = /\\+/g
+export function normalizePath(dir: string) {
+ return dir.replace(RE_SLASH, '/')
+}
+
+export function pathJoin(...args: string[]) {
+ return normalizePath(path.join(...args))
+}
+
+const RE_START_END_SLASH = /^\/|\/$/g
+export function getCurrentDirname(basePath: string | undefined, filepath: string) {
+ const dirList = normalizePath(basePath || path.dirname(filepath))
+ .replace(RE_START_END_SLASH, '')
+ .split('/')
+ return dirList.length > 0 ? dirList[dirList.length - 1] : ''
+}
diff --git a/theme/src/shared/options/plugins.ts b/theme/src/shared/options/plugins.ts
index cdd53aee..85d97f5d 100644
--- a/theme/src/shared/options/plugins.ts
+++ b/theme/src/shared/options/plugins.ts
@@ -50,7 +50,7 @@ export interface PlumeThemePluginOptions {
baiduTongji?: false | BaiduTongjiOptions
- frontmatter?: AutoFrontmatterOptions
+ frontmatter?: Omit
readingTime?: false | ReadingTimeOptions
}
diff --git a/tsconfig.json b/tsconfig.json
index e5590835..4f8e6589 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -10,6 +10,7 @@
"@internal/notesData": [
"./plugins/plugin-notes-data/src/client/notesData.d.ts"
],
+ "@internal/pageComponents": ["./docs/.vuepress/.temp/internal/pageComponents.js"],
"@internal/*": ["./docs/.vuepress/.temp/internal/*"],
"@vuepress-plume/*": ["./plugins/*/src/node/index.ts"],
"vuepress-theme-plume": ["./theme/src/node/index.ts"],
@@ -25,5 +26,5 @@
"docs/.vuepress/**/*",
"scripts/**/*"
],
- "exclude": ["node_modules", ".temp", ".cache", "lib", "dist"]
+ "exclude": ["node_modules", ".cache", "lib", "dist"]
}