Actualización de Astro, cambio de fechas de los posts, mejora en la indexación, cambio de sitio de los posts, cambio en el workflow a manual

This commit is contained in:
2025-02-25 11:05:22 +01:00
parent 94019bd963
commit 8e8b7cad1d
35 changed files with 1331 additions and 1748 deletions

View File

@@ -0,0 +1,16 @@
---
import { getCollection, render } from 'astro:content';
// 1. Generate a new path for every collection entry
export async function getStaticPaths() {
const posts = await getCollection('posts');
return posts.map(post => ({
params: { id: post.id },
props: { post },
}));
}
// 2. For your template, you can get the entry directly from the prop
const { post } = Astro.props;
const { Content } = await render(post);
---
<h1>{post.data.titulo}</h1>
<Content />