mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-27 16:06:59 +02:00
feat(content-blog): include tags in feed (#6388)
* feat(content-blog): include tags in feed * fix
This commit is contained in:
parent
62223ee556
commit
7bab9ba46d
6 changed files with 58 additions and 11 deletions
|
@ -69,7 +69,14 @@ async function generateBlogFeed({
|
|||
blogPosts.forEach((post) => {
|
||||
const {
|
||||
id,
|
||||
metadata: {title: metadataTitle, permalink, date, description, authors},
|
||||
metadata: {
|
||||
title: metadataTitle,
|
||||
permalink,
|
||||
date,
|
||||
description,
|
||||
authors,
|
||||
tags,
|
||||
},
|
||||
} = post;
|
||||
|
||||
const feedItem: FeedItem = {
|
||||
|
@ -78,6 +85,8 @@ async function generateBlogFeed({
|
|||
link: normalizeUrl([siteUrl, permalink]),
|
||||
date,
|
||||
description,
|
||||
// Atom feed demands the "term", while other feeds use "name"
|
||||
category: tags.map((tag) => ({name: tag.label, term: tag.label})),
|
||||
content: mdxToFeedContent(post.content),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue