fix(content-blog): blog Atom feed id + RSS feed guid should be fully qualified urls (#8381)

Closes https://github.com/facebook/docusaurus/issues/8380
This commit is contained in:
John Reilly 2022-11-30 12:56:21 +00:00 committed by GitHub
parent 97ca090223
commit 79214670a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 24 deletions

File diff suppressed because one or more lines are too long

View file

@ -61,7 +61,6 @@ async function generateBlogFeed({
await Promise.all( await Promise.all(
blogPosts.map(async (post) => { blogPosts.map(async (post) => {
const { const {
id,
metadata: { metadata: {
title: metadataTitle, title: metadataTitle,
permalink, permalink,
@ -79,10 +78,11 @@ async function generateBlogFeed({
); );
const $ = cheerioLoad(content); const $ = cheerioLoad(content);
const link = normalizeUrl([siteUrl, permalink]);
const feedItem: FeedItem = { const feedItem: FeedItem = {
title: metadataTitle, title: metadataTitle,
id, id: link,
link: normalizeUrl([siteUrl, permalink]), link,
date, date,
description, description,
// Atom feed demands the "term", while other feeds use "name" // Atom feed demands the "term", while other feeds use "name"