---
import Layout from "@/layouts/Layout.astro";
import { getCollection, render } from "astro:content";
import { type GetStaticPaths } from "astro";
interface Props {
entry: any;
}
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",
},
);
const schema = {
"@context": "https://schema.org",
"@type": "BlogPosting",
headline: entry.data.title,
datePublished: entry.data.publishedAt.toISOString(),
keywords: entry.data.tags || [],
author: {
"@type": "Person",
name: "Ariel Costas Guerrero",
},
publisher: {
"@type": "Person",
name: "Ariel Costas Guerrero",
url: "https://www.costas.dev",
image: {
"@type": "ImageObject",
url: "https://www.costas.dev/favicon.png",
},
},
};
---
{entry.data.title}
Publicado el
{entry.data.tags && entry.data.tags.length > 0 && (
<>
• Etiquetas:
>
)}
Volver al blog