diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-01-22 01:06:18 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-01-22 01:06:18 +0100 |
| commit | 3f33d93e853095f36f9e31b21d897f6bae2d20e8 (patch) | |
| tree | 73580b406b06df596d23326e2929e3ef6250958d /src/pages | |
| parent | e98abc570c82eaba1719a8fe231d012289c5e462 (diff) | |
Estilo más retro
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/blog.xml.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pages/blog.xml.ts b/src/pages/blog.xml.ts index c0b5086..d62d675 100644 --- a/src/pages/blog.xml.ts +++ b/src/pages/blog.xml.ts @@ -15,11 +15,11 @@ const spanishPubDate = (date: Date): string => { export const GET: APIRoute = async (context) => { const collection = (await getCollection("blog")) - .filter((post) => post.data.publishedAt && post.data.title && post.data.description) + .filter((post) => post.data.publishedAt && post.data.title) .sort((a, b) => { return new Date(b.data.publishedAt).getTime() - new Date(a.data.publishedAt).getTime(); }) - .slice(0, 20); // Limit to the latest 20 posts + .slice(0, 10); // Limit to the latest 20 posts return rss({ title: "Blog de Ariel Costas", @@ -32,7 +32,7 @@ export const GET: APIRoute = async (context) => { items: collection.map((post) => ({ title: post.data.title, link: `${context.url.origin}/blog/${post.id}`, - description: post.data.description, + description: post.data.description ?? "", pubDate: post.data.publishedAt, categories: post.data.tags, customData: `<cdrss:spanishPubDate>${spanishPubDate(post.data.publishedAt)}</cdrss:spanishPubDate>`, |
