aboutsummaryrefslogtreecommitdiff
path: root/src/pages/blog.xml.ts
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-04-10 21:42:41 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-04-10 21:42:41 +0200
commite3141794b95e534656427fadf0354435c62254d6 (patch)
tree95788249ac51475aea45ad17d7157dffd1564e47 /src/pages/blog.xml.ts
parent3caee506c961ae0e78503164ed6a0f81db3c8c32 (diff)
Fix formatting
Diffstat (limited to 'src/pages/blog.xml.ts')
-rw-r--r--src/pages/blog.xml.ts29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/pages/blog.xml.ts b/src/pages/blog.xml.ts
index f165475..44233b3 100644
--- a/src/pages/blog.xml.ts
+++ b/src/pages/blog.xml.ts
@@ -1,19 +1,18 @@
-import rss from '@astrojs/rss';
-import { getCollection } from 'astro:content';
-
+import rss from "@astrojs/rss";
+import { getCollection } from "astro:content";
export async function GET(context: any) {
- const collection = await getCollection('blog');
+ const collection = await getCollection("blog");
- return rss({
- title: "Blog de Ariel Costas",
- description: "Artículos del blog de Ariel Costas",
- site: context.site,
- items: collection.map((post: any) => ({
- title: post.data.title,
- link: `${context.site}blog/${post.slug}`,
- description: post.data.metaDescription,
- pubDate: post.data.publishedAt
- }))
- })
+ return rss({
+ title: "Blog de Ariel Costas",
+ description: "Artículos del blog de Ariel Costas",
+ site: context.site,
+ items: collection.map((post: any) => ({
+ title: post.data.title,
+ link: `${context.site}blog/${post.slug}`,
+ description: post.data.metaDescription,
+ pubDate: post.data.publishedAt,
+ })),
+ });
}