优化:聚合ArticleMetadata组件,方便《我的标签》及每篇文章中的复用
This commit is contained in:
@@ -9,7 +9,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"/>`
|
||||
if (tokens[idx].tag === 'h1') htmlResult += `\n<ArticleMetadata v-if="$frontmatter?.aside ?? true" :article="$frontmatter" />`
|
||||
return htmlResult
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user