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: '下一页' } }, blog: { pagination: { prevPageText: '上一页', nextPageText: '下一页' } },
outlineLabel: '内容大纲', outlineLabel: '此页内容',
returnToTopLabel: '返回顶部', returnToTopLabel: '返回顶部',
editLinkText: '编辑此页', editLinkText: '编辑此页',
contributorsText: '贡献者',
lastUpdatedText: '上次更新', lastUpdatedText: '上次更新',
prevPageLabel: '上一页', prevPageLabel: '上一页',
nextPageLabel: '下一页', nextPageLabel: '下一页',

View File

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