fix: add article content to description
This commit is contained in:
parent
5efaf23eca
commit
69112f3976
|
@ -1,8 +1,20 @@
|
||||||
import rss from '@astrojs/rss';
|
import rss from '@astrojs/rss';
|
||||||
|
|
||||||
|
const emailImportResult = import.meta.glob('./daily-emails/**/*.md', { eager: true });
|
||||||
|
const emails = Object.values(emailImportResult)
|
||||||
|
.sort((a, b) =>
|
||||||
|
new Date(b.frontmatter.pubDate).valueOf() -
|
||||||
|
new Date(a.frontmatter.pubDate).valueOf()
|
||||||
|
)
|
||||||
|
|
||||||
export const get = () => rss({
|
export const get = () => rss({
|
||||||
title: 'Daily list',
|
title: 'Daily list',
|
||||||
description: '',
|
description: 'A daily newsletter on software development, DevOps, community, and open-source.',
|
||||||
site: 'https://www.oliverdavies.uk',
|
site: import.meta.env.SITE,
|
||||||
items: import.meta.glob('./daily-emails/**/*.{md,mdx}'),
|
items: emails.map((email) => ({
|
||||||
})
|
description: email.compiledContent(),
|
||||||
|
link: email.url,
|
||||||
|
pubDate: email.frontmatter.pubDate,
|
||||||
|
title: email.frontmatter.title,
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue