From b089d28af57bf0caf31a84191f1741e4f5569997 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Tue, 14 Feb 2023 05:01:11 +0800 Subject: [PATCH] feat(theme): add social icon `qq/weibo/bilibili` --- .../theme/src/client/utils/socialIcons.ts | 5 +++ packages/theme/src/shared/options/locale.ts | 35 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/packages/theme/src/client/utils/socialIcons.ts b/packages/theme/src/client/utils/socialIcons.ts index 54a91e6e..0dcd8719 100644 --- a/packages/theme/src/client/utils/socialIcons.ts +++ b/packages/theme/src/client/utils/socialIcons.ts @@ -19,4 +19,9 @@ export const icons = { 'Twitter', youtube: 'YouTube', + qq: 'QQ', + weibo: + 'weibo', + bilibili: + 'bilibili', } as const diff --git a/packages/theme/src/shared/options/locale.ts b/packages/theme/src/shared/options/locale.ts index cd374845..25cd19c1 100644 --- a/packages/theme/src/shared/options/locale.ts +++ b/packages/theme/src/shared/options/locale.ts @@ -34,6 +34,9 @@ export type SocialLinkIcon = | 'slack' | 'twitter' | 'youtube' + | 'qq' + | 'weibo' + | 'bilibili' | { svg: string } export interface PlumeThemeLocaleData extends LocaleData { @@ -73,6 +76,38 @@ export interface PlumeThemeLocaleData extends LocaleData { */ social?: SocialLink[] + blog?: { + /** + * blog 文章读取目录 + * + * @default './' 即 vuepress 配置的 source 目录 + */ + dir?: string + + /** + * blog list link + * + * @default '/blog/' + */ + link?: string + + /** + * 在 `blog.dir` 目录中,通过 glob string 配置包含文件 + * + * @default - ['**\*.md'] + */ + include?: string[] + + /** + * 在 `blog.dir` 目录中,通过 glob string 配置排除的文件 + * + * _README.md 文件一般作为主页或者某个目录下的主页,不应该被读取为 blog文章_ + * + * @default - ['.vuepress/', 'node_modules/', '{README,index}.md'] + */ + exclude?: string[] + } + /** * 文章链接前缀 *