升级:VitePress 版本升级为 v1.0.0-alpha.8

This commit is contained in:
2022-08-18 11:22:44 +08:00
parent a63bc6bc13
commit 4967b49430
12 changed files with 227 additions and 233 deletions

View File

@@ -12,7 +12,7 @@ export const markdown: MarkdownOptions = {
config: (md) => {
md.renderer.rules.heading_close = (tokens, idx, options, env, slf) => {
let htmlResult = slf.renderToken(tokens, idx, options, env, slf)
if (tokens[idx].tag === 'h1') htmlResult += `\n<ArticleMetadata v-if="($frontmatter?.aside ?? true) && ($frontmatter?.showArticleMetadata ?? true)" :article="$frontmatter" />`
if (tokens[idx].tag === 'h1') htmlResult += `\n<ClientOnly><ArticleMetadata v-if="($frontmatter?.aside ?? true) && ($frontmatter?.showArticleMetadata ?? true)" :article="$frontmatter" /></ClientOnly>`
return htmlResult
}
}