@docusaurus/plugin-content-blog 0.0.0-4433 → 0.0.0-4434
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/feed.js +3 -1
- package/package.json +8 -8
- package/src/feed.ts +10 -1
package/lib/feed.js
CHANGED
|
@@ -49,13 +49,15 @@ async function generateBlogFeed({ blogPosts, options, siteConfig, }) {
|
|
|
49
49
|
return { name: author.name, link: author.url };
|
|
50
50
|
}
|
|
51
51
|
blogPosts.forEach((post) => {
|
|
52
|
-
const { id, metadata: { title: metadataTitle, permalink, date, description, authors }, } = post;
|
|
52
|
+
const { id, metadata: { title: metadataTitle, permalink, date, description, authors, tags, }, } = post;
|
|
53
53
|
const feedItem = {
|
|
54
54
|
title: metadataTitle,
|
|
55
55
|
id,
|
|
56
56
|
link: (0, utils_1.normalizeUrl)([siteUrl, permalink]),
|
|
57
57
|
date,
|
|
58
58
|
description,
|
|
59
|
+
// Atom feed demands the "term", while other feeds use "name"
|
|
60
|
+
category: tags.map((tag) => ({ name: tag.label, term: tag.label })),
|
|
59
61
|
content: mdxToFeedContent(post.content),
|
|
60
62
|
};
|
|
61
63
|
// json1() method takes the first item of authors array
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-blog",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4434",
|
|
4
4
|
"description": "Blog plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-blog.d.ts",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "0.0.0-
|
|
22
|
-
"@docusaurus/logger": "0.0.0-
|
|
23
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
24
|
-
"@docusaurus/utils": "0.0.0-
|
|
25
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
21
|
+
"@docusaurus/core": "0.0.0-4434",
|
|
22
|
+
"@docusaurus/logger": "0.0.0-4434",
|
|
23
|
+
"@docusaurus/mdx-loader": "0.0.0-4434",
|
|
24
|
+
"@docusaurus/utils": "0.0.0-4434",
|
|
25
|
+
"@docusaurus/utils-validation": "0.0.0-4434",
|
|
26
26
|
"escape-string-regexp": "^4.0.0",
|
|
27
27
|
"feed": "^4.2.2",
|
|
28
28
|
"fs-extra": "^10.0.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"webpack": "^5.61.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@docusaurus/types": "0.0.0-
|
|
39
|
+
"@docusaurus/types": "0.0.0-4434"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "^16.8.4 || ^17.0.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=14"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "b0869d175f2eb951d5b87d00c772a127fb6933cb"
|
|
49
49
|
}
|
package/src/feed.ts
CHANGED
|
@@ -69,7 +69,14 @@ async function generateBlogFeed({
|
|
|
69
69
|
blogPosts.forEach((post) => {
|
|
70
70
|
const {
|
|
71
71
|
id,
|
|
72
|
-
metadata: {
|
|
72
|
+
metadata: {
|
|
73
|
+
title: metadataTitle,
|
|
74
|
+
permalink,
|
|
75
|
+
date,
|
|
76
|
+
description,
|
|
77
|
+
authors,
|
|
78
|
+
tags,
|
|
79
|
+
},
|
|
73
80
|
} = post;
|
|
74
81
|
|
|
75
82
|
const feedItem: FeedItem = {
|
|
@@ -78,6 +85,8 @@ async function generateBlogFeed({
|
|
|
78
85
|
link: normalizeUrl([siteUrl, permalink]),
|
|
79
86
|
date,
|
|
80
87
|
description,
|
|
88
|
+
// Atom feed demands the "term", while other feeds use "name"
|
|
89
|
+
category: tags.map((tag) => ({name: tag.label, term: tag.label})),
|
|
81
90
|
content: mdxToFeedContent(post.content),
|
|
82
91
|
};
|
|
83
92
|
|