From e3141794b95e534656427fadf0354435c62254d6 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Thu, 10 Apr 2025 21:42:41 +0200 Subject: Fix formatting --- src/pages/blog.xml.ts | 29 ++++--- src/pages/blog/[id].astro | 85 +++++++++++---------- src/pages/blog/index.astro | 116 +++++++++++++++------------- src/pages/contact.astro | 162 ++++++++++++++++++++++------------------ src/pages/en/contact.astro | 2 +- src/pages/en/index.astro | 2 +- src/pages/en/portfolio.astro | 2 +- src/pages/en/trajectory.astro | 2 +- src/pages/index.astro | 2 +- src/pages/portfolio/[id].astro | 75 +++++++++++-------- src/pages/portfolio/index.astro | 2 +- 11 files changed, 260 insertions(+), 219 deletions(-) (limited to 'src/pages') 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, + })), + }); } diff --git a/src/pages/blog/[id].astro b/src/pages/blog/[id].astro index e1b5250..65c8a25 100644 --- a/src/pages/blog/[id].astro +++ b/src/pages/blog/[id].astro @@ -4,59 +4,64 @@ import { getCollection, render } from "astro:content"; import { type GetStaticPaths } from "astro"; interface Props { - entry: any; + entry: any; } -export const getStaticPaths: GetStaticPaths = (async () => { - const entries = await getCollection("blog"); - return entries.map((entry: any) => ({ - params: { id: entry.id }, - props: { entry }, - })); -}); +export const getStaticPaths: GetStaticPaths = async () => { + const entries = await getCollection("blog"); + return entries.map((entry: any) => ({ + params: { id: entry.id }, + props: { entry }, + })); +}; const { entry } = Astro.props; const { Content } = await render(entry); const formattedDate = new Date(entry.data.publishedAt).toLocaleDateString( - "es-ES", - { - year: "numeric", - month: "long", - day: "numeric", - weekday: "long", - }, + "es-ES", + { + year: "numeric", + month: "long", + day: "numeric", + weekday: "long", + }, ); const schema = { - "@context": "https://schema.org", - "@type": "BlogPosting", - headline: entry.data.title, - datePublished: entry.data.publishedAt.toISOString(), - author: { - "@type": "Person", - name: "Ariel Costas Guerrero", - }, - publisher: { - "@type": "Person", - name: "Ariel Costas Guerrero", - logo: { - "@type": "ImageObject", - url: "https://www.costas.dev/favicon.png", - }, - }, + "@context": "https://schema.org", + "@type": "BlogPosting", + headline: entry.data.title, + datePublished: entry.data.publishedAt.toISOString(), + author: { + "@type": "Person", + name: "Ariel Costas Guerrero", + }, + publisher: { + "@type": "Person", + name: "Ariel Costas Guerrero", + logo: { + "@type": "ImageObject", + url: "https://www.costas.dev/favicon.png", + }, + }, }; --- - + + + diff --git a/src/pages/en/contact.astro b/src/pages/en/contact.astro index ef69d6e..6ccb15c 100644 --- a/src/pages/en/contact.astro +++ b/src/pages/en/contact.astro @@ -2,4 +2,4 @@ import ContactPageLayout from "../../layouts/ContactPageLayout.astro"; --- - \ No newline at end of file + diff --git a/src/pages/en/index.astro b/src/pages/en/index.astro index 8c5945a..a7c9dbf 100644 --- a/src/pages/en/index.astro +++ b/src/pages/en/index.astro @@ -2,4 +2,4 @@ import HomePageLayout from "../../layouts/HomePageLayout.astro"; --- - \ No newline at end of file + diff --git a/src/pages/en/portfolio.astro b/src/pages/en/portfolio.astro index 63840f5..17c4637 100644 --- a/src/pages/en/portfolio.astro +++ b/src/pages/en/portfolio.astro @@ -2,4 +2,4 @@ import PortfolioPageLayout from "../../layouts/PortfolioPageLayout.astro"; --- - \ No newline at end of file + diff --git a/src/pages/en/trajectory.astro b/src/pages/en/trajectory.astro index 3f5ff77..cb5b088 100644 --- a/src/pages/en/trajectory.astro +++ b/src/pages/en/trajectory.astro @@ -2,4 +2,4 @@ import TrajectoryPageLayout from "../../layouts/TrajectoryPageLayout.astro"; --- - \ No newline at end of file + diff --git a/src/pages/index.astro b/src/pages/index.astro index 8ac64a6..2dd3973 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -2,4 +2,4 @@ import HomePageLayout from "../layouts/HomePageLayout.astro"; --- - \ No newline at end of file + diff --git a/src/pages/portfolio/[id].astro b/src/pages/portfolio/[id].astro index 55bac3f..b92ecbd 100644 --- a/src/pages/portfolio/[id].astro +++ b/src/pages/portfolio/[id].astro @@ -5,51 +5,62 @@ import { type GetStaticPaths } from "astro"; import TechnologyBadge from "../../partials/TechnologyBadge.astro"; interface Props { - entry: any; + entry: any; } -export const getStaticPaths: GetStaticPaths = (async () => { - const entries = await getCollection("portfolio"); - return entries.map((entry: any) => ({ - params: { id: entry.id }, - props: { entry }, - })); -}); +export const getStaticPaths: GetStaticPaths = async () => { + const entries = await getCollection("portfolio"); + return entries.map((entry: any) => ({ + params: { id: entry.id }, + props: { entry }, + })); +}; const { entry } = Astro.props; const { Content } = await render(entry); --- - - - - - Volver al portfolio - + + + + + Volver al portfolio + -

{entry.data.title}

+

{entry.data.title}

- + -

Tecnologías utilizadas

+

Tecnologías utilizadas

- {entry.data.technologies.map((technology: string) => ( - - ))} + { + entry.data.technologies.map((technology: string) => ( + + )) + }
diff --git a/src/pages/portfolio/index.astro b/src/pages/portfolio/index.astro index 63840f5..17c4637 100644 --- a/src/pages/portfolio/index.astro +++ b/src/pages/portfolio/index.astro @@ -2,4 +2,4 @@ import PortfolioPageLayout from "../../layouts/PortfolioPageLayout.astro"; --- - \ No newline at end of file + -- cgit v1.3