From 0da0568267a5776033163c183108e0d912a05cf8 Mon Sep 17 00:00:00 2001 From: "Mr.Hope" Date: Sat, 12 Nov 2022 15:45:16 +0700 Subject: [PATCH] fix(theme): fix feed customElements --- packages/theme/src/node/plugins/feed.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/theme/src/node/plugins/feed.ts b/packages/theme/src/node/plugins/feed.ts index 787cf47f6e63..5b42cc0b7a44 100644 --- a/packages/theme/src/node/plugins/feed.ts +++ b/packages/theme/src/node/plugins/feed.ts @@ -24,25 +24,38 @@ export const getFeedPlugin = ( deepAssign( { hostname, - author: themeConfig.author, + ...(themeConfig.author ? { author: themeConfig.author } : {}), locales: Object.entries(themeConfig.locales).map( ([localePath, { author, copyright }]) => [ localePath, { author, channel: { copyright } }, ] ), + }, + options || {}, + { customElements: [ "ExternalLinkIcon", "Badge", + "Bilibili", "ChartJS", "CodeDemo", + "CodePen", "CodeTabs", + "ECharts", "FlowChart", "Mermaid", + "PDF", + "Playground", "Presentation", + "StackBlitz", + "Tabs", + "VideoPlayer", + "VuePlayground", + "YouTube", + ...(options?.customElements || []), ], - }, - options || {} + } ), legacy );