From fe5da597ce6bce4f53f8a6dff495df1c8b1babb8 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sun, 7 Jan 2024 01:51:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20md=20=E5=A2=9E=E5=BC=BA=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20tabs=E3=80=81footnote=E3=80=81gfm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme/src/node/defaultOptions.ts | 3 ++- theme/src/node/plugins.ts | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/theme/src/node/defaultOptions.ts b/theme/src/node/defaultOptions.ts index 9164b778..3a813158 100644 --- a/theme/src/node/defaultOptions.ts +++ b/theme/src/node/defaultOptions.ts @@ -18,9 +18,10 @@ const defaultLocales: NonNullable = { blog: { pagination: { prevPageText: '上一页', nextPageText: '下一页' } }, - outlineLabel: '内容大纲', + outlineLabel: '此页内容', returnToTopLabel: '返回顶部', editLinkText: '编辑此页', + contributorsText: '贡献者', lastUpdatedText: '上次更新', prevPageLabel: '上一页', nextPageLabel: '下一页', diff --git a/theme/src/node/plugins.ts b/theme/src/node/plugins.ts index 6d53c5d0..157d80c4 100644 --- a/theme/src/node/plugins.ts +++ b/theme/src/node/plugins.ts @@ -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))