diff --git a/packages/docusaurus-plugin-content-blog/src/feed.ts b/packages/docusaurus-plugin-content-blog/src/feed.ts index dc9a7b85f84c..9efc84e16ccf 100644 --- a/packages/docusaurus-plugin-content-blog/src/feed.ts +++ b/packages/docusaurus-plugin-content-blog/src/feed.ts @@ -106,6 +106,14 @@ async function defaultCreateFeedItems({ const $ = cheerioLoad(content); const link = normalizeUrl([siteUrl, permalink]); + + $(`div#${blogPostContainerID} a`).each((_, elm) => { + const {href} = elm.attribs; + if (href) { + elm.attribs.href = String(new URL(href, link)); + } + }); + const feedItem: BlogFeedItem = { title: metadataTitle, id: link,