Add a short snippet to the daily RSS feed item
This commit is contained in:
parent
566318ddfc
commit
7801c5f0c5
|
@ -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(),
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>`,
|
||||||
|
|
Loading…
Reference in a new issue