diff --git a/src/content/config.ts b/src/content/config.ts index b5fe623e..b3f1084f 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -13,6 +13,7 @@ const blogCollection = defineCollection({ const dailyEmailCollection = defineCollection({ schema: z.object({ + snippet: z.string().optional(), pubDate: z.date(), permalink: z.string(), tags: z.array(z.string()).optional(), diff --git a/src/content/daily-email/2023-12-26.md b/src/content/daily-email/2023-12-26.md index b8c35693..4729ca76 100644 --- a/src/content/daily-email/2023-12-26.md +++ b/src/content/daily-email/2023-12-26.md @@ -1,8 +1,10 @@ --- title: > 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 -permalink: > +permalink: >- archive/2023/12/26/good-code-is-not-about-being-easy-to-write tags: - software-development diff --git a/src/pages/rss/daily.xml.js b/src/pages/rss/daily.xml.js index 37424228..d00a3b6f 100644 --- a/src/pages/rss/daily.xml.js +++ b/src/pages/rss/daily.xml.js @@ -54,6 +54,7 @@ export async function get() { pubDate: email.data.pubDate, title: `${email.data.title.trim()}`, customData: ` + ${email.data.snippet} #dev ${email.data.tags.map(tag => `#${convertTag(tag)}`).join(' ')} `, diff --git a/stub.md b/stub.md index 0dace29e..3fb6686e 100644 --- a/stub.md +++ b/stub.md @@ -1,9 +1,11 @@ --- -title: > +title: >- {{ title }} pubDate: {{ date }} permalink: > {{ permalink }} +snippet: >- + TODO # tags: # - a # - b