{changelog.title}
+ ++
- {entry.date} · {(() => {
- const authorName = entry.author.trim().replace(/^@+/, "");
- return entry.slackId ?
{truncateWords(entry.excerpt, 18)}
+{entry.date} · {entry.author}
+ + ); + } + + return ( +${escapeHtml(paragraph)}
`).join("") + : `${escapeHtml(post.excerpt)}
`; + + return { + title: post.title, + description: post.excerpt, + pubDate: post.date, + link: legacyLink, + content: paragraphContent + }; + }); - const paragraphContent = post.paragraphs.length - ? post.paragraphs.map((paragraph) => `${escapeHtml(paragraph)}
`).join("") - : `${escapeHtml(post.excerpt)}
`; + const longChangelogItems = changelogs + .filter((entry) => entry.kind === "long") + .map((entry) => { + const paragraphContent = entry.paragraphs.length + ? entry.paragraphs.map((paragraph) => `${escapeHtml(paragraph)}
`).join("") + : `${escapeHtml(entry.excerpt)}
`; return { - title: post.title, - description: post.excerpt, - pubDate: post.date, - link: legacyLink, + title: entry.title, + description: entry.excerpt, + pubDate: new Date(`${entry.date}T00:00:00Z`), + link: entry.url, content: paragraphContent }; - }) + }); + + const items = [...postItems, ...longChangelogItems].sort( + (a, b) => b.pubDate.getTime() - a.pubDate.getTime() + ); + + return rss({ + title: site.title, + description: site.description, + site: context.site, + items }); } diff --git a/src/pages/index.astro b/src/pages/index.astro index d70ee09..a68d6a8 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -112,12 +112,13 @@ const acknowledgements = await getAcknowledgements(); {recentChangelog.map((entry, index) => ( <> {index < recentChangelog.length - 1 &&