From 96b999a3e9c2e4a45897f2015b9fdab3c81962df Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> Date: Fri, 14 Mar 2025 11:07:40 +0100 Subject: Update dependencies, fix path issues --- src/pages/blog.astro | 69 ---------------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 src/pages/blog.astro (limited to 'src/pages/blog.astro') diff --git a/src/pages/blog.astro b/src/pages/blog.astro deleted file mode 100644 index 31920aa..0000000 --- a/src/pages/blog.astro +++ /dev/null @@ -1,69 +0,0 @@ ---- -import { getCollection } from "astro:content"; -import Layout from "../layouts/Layout.astro"; -const blogCollection = (await getCollection("blog")).sort((a, b) => { - return b.data.publishedAt.getTime() - a.data.publishedAt.getTime(); -}); -const groupedPosts = blogCollection.reduce( - (acc: Record, post) => { - const year = post.data.publishedAt.getFullYear(); - const month = post.data.publishedAt.getMonth() + 1; - const key = `${year}-${month}`; - if (!acc[key]) { - acc[key] = []; - } - acc[key].push(post); - return acc; - }, - {}, -); -function humaniseDate(date: Date) { - const result = date.toLocaleDateString("es-ES", { - month: "long", - year: "numeric", - }); - return result.charAt(0).toUpperCase() + result.slice(1); -} -const schema = { - "@context": "https://schema.org", - "@type": "Blog", - "headline": "Blog de Ariel Costas", - "description": "En este blog encontrarás artículos sobre desarrollo, tecnología y otras temáticas que pueda querer compartir. Disclaimer de siempre: las opiniones son mías, y no representan a ninguna empresa o institución.", - "publisher": { - "@type": "Person", - "name": "Ariel Costas", - }, - "author": { - "@type": "Person", - "name": "Ariel Costas", - } -}; - ---- - - - - -

Blog de Ariel Costas

- -

- En este blog encontrarás artículos sobre desarrollo, tecnología y otras - temáticas que pueda querer compartir. Disclaimer de siempre: las - opiniones son mías, y no representan a ninguna empresa o institución. -

- - { - Object.entries(groupedPosts).map(([key, posts]) => ( -
-

{humaniseDate(new Date(key))}

- -
- )) - } -
-- cgit v1.3