Add a short snippet to the daily RSS feed item

This commit is contained in:
Oliver Davies 2023-12-27 13:00:00 +00:00
parent 566318ddfc
commit 7801c5f0c5
4 changed files with 8 additions and 2 deletions

View file

@ -13,6 +13,7 @@ const blogCollection = defineCollection({
const dailyEmailCollection = defineCollection({ const dailyEmailCollection = defineCollection({
schema: z.object({ schema: z.object({
snippet: z.string().optional(),
pubDate: z.date(), pubDate: z.date(),
permalink: z.string(), permalink: z.string(),
tags: z.array(z.string()).optional(), tags: z.array(z.string()).optional(),

View file

@ -1,8 +1,10 @@
--- ---
title: > title: >
Good code is not about being easy to write Good code is not about being easy to write
snippet: >-
Good code is not about being easy to write. It's about how easy it is to change.
pubDate: 2023-12-26 pubDate: 2023-12-26
permalink: > permalink: >-
archive/2023/12/26/good-code-is-not-about-being-easy-to-write archive/2023/12/26/good-code-is-not-about-being-easy-to-write
tags: tags:
- software-development - software-development

View file

@ -54,6 +54,7 @@ export async function get() {
pubDate: email.data.pubDate, pubDate: email.data.pubDate,
title: `${email.data.title.trim()}`, title: `${email.data.title.trim()}`,
customData: ` customData: `
<snippet>${email.data.snippet}</snippet>
<tags> <tags>
#dev ${email.data.tags.map(tag => `#${convertTag(tag)}`).join(' ')} #dev ${email.data.tags.map(tag => `#${convertTag(tag)}`).join(' ')}
</tags>`, </tags>`,

View file

@ -1,9 +1,11 @@
--- ---
title: > title: >-
{{ title }} {{ title }}
pubDate: {{ date }} pubDate: {{ date }}
permalink: > permalink: >
{{ permalink }} {{ permalink }}
snippet: >-
TODO
# tags: # tags:
# - a # - a
# - b # - b