We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52f32bb commit 31992bbCopy full SHA for 31992bb
apps/site/next-data/generators/websiteFeeds.mjs
@@ -33,13 +33,17 @@ const generateWebsiteFeeds = ({ posts }) => {
33
34
const blogFeedEntries = posts
35
.filter(post => post.categories.includes(category))
36
- .map(post => ({
37
- id: post.slug,
38
- title: post.title,
39
- author: post.author,
40
- date: new Date(post.date),
41
- link: `${canonicalUrl}${post.slug}`,
42
- }));
+ .map(post => {
+ const date = new Date(post.date);
+ return {
+ id: post.slug,
+ title: post.title,
+ author: post.author,
+ date,
43
+ link: `${canonicalUrl}${post.slug}`,
44
+ guid: `${post.slug}?${date.getTime()}`,
45
+ };
46
+ });
47
48
blogFeedEntries.forEach(entry => feed.addItem(entry));
49
0 commit comments