Add a short snippet to the daily RSS feed item
This commit is contained in:
		
							parent
							
								
									566318ddfc
								
							
						
					
					
						commit
						7801c5f0c5
					
				
					 4 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -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>`,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								stub.md
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								stub.md
									
										
									
									
									
								
							| 
						 | 
					@ -1,9 +1,11 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
title: >
 | 
					title: >-
 | 
				
			||||||
  {{ title }}
 | 
					  {{ title }}
 | 
				
			||||||
pubDate: {{ date }}
 | 
					pubDate: {{ date }}
 | 
				
			||||||
permalink: >
 | 
					permalink: >
 | 
				
			||||||
  {{ permalink }}
 | 
					  {{ permalink }}
 | 
				
			||||||
 | 
					snippet: >-
 | 
				
			||||||
 | 
					  TODO
 | 
				
			||||||
# tags:
 | 
					# tags:
 | 
				
			||||||
#   - a
 | 
					#   - a
 | 
				
			||||||
#   - b
 | 
					#   - b
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue