feat: md 增强支持 tabs、footnote、gfm

This commit is contained in:
pengzhanbo 2024-01-07 01:51:41 +08:00
parent 12917050c8
commit fe5da597ce
2 changed files with 7 additions and 3 deletions

View File

@ -18,9 +18,10 @@ const defaultLocales: NonNullable<PlumeThemeLocaleOptions['locales']> = {
blog: { pagination: { prevPageText: '上一页', nextPageText: '下一页' } },
outlineLabel: '内容大纲',
outlineLabel: '此页内容',
returnToTopLabel: '返回顶部',
editLinkText: '编辑此页',
contributorsText: '贡献者',
lastUpdatedText: '上次更新',
prevPageLabel: '上一页',
nextPageLabel: '下一页',

View File

@ -161,6 +161,7 @@ export function setupPlugins(
{
hint: true, // info note tip warning danger details
codetabs: true,
tabs: true,
align: true,
mark: true,
tasklist: true,
@ -168,6 +169,8 @@ export function setupPlugins(
attrs: true,
sup: true,
sub: true,
alert: true,
footnote: true,
katex: true,
} as MarkdownEnhanceOptions,
options.markdownEnhance || {},
@ -175,8 +178,8 @@ export function setupPlugins(
))
}
if (options.comment !== false)
plugins.push(commentPlugin(options.comment || {}))
if (options.comment)
plugins.push(commentPlugin(options.comment))
if (options.baiduTongji !== false && options.baiduTongji?.key)
plugins.push(baiduTongjiPlugin(options.baiduTongji))