feat: Add clients

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
2023-10-01 19:54:31 +02:00
parent fe437165a1
commit 3436392be9
22 changed files with 260 additions and 56 deletions

View File

@ -5,16 +5,16 @@ import Article from 'layouts/Article.astro'
export const prerender = true
// 1. Generate a new path for every collection entry
export async function getStaticPaths() {
const blogEntries = await getCollection('projects');
return blogEntries.map(entry => ({
params: { project: entry.slug }, props: { entry },
}));
const blogEntries = await getCollection('projects');
return blogEntries.map((entry) => ({
params: { project: entry.slug }, props: { entry },
}))
}
// 2. For your template, you can get the entry directly from the prop
const { entry } = Astro.props;
const { Content } = await entry.render();
---
<Article title={entry.data.title} link={entry.data.link} breadcrumb={[{text: 'Accueil', href: '/'}, {text: 'Projets', href: '/projets'}, {text: entry.data.title}]}>
<Article title={entry.data.title} image={[entry.data.image]} description={entry.data.description} link={entry.data.link} breadcrumb={[{text: 'Accueil', href: '/'}, {text: 'Projets', href: '/projets'}, {text: entry.data.title}]}>
<h1>{entry.data.title}</h1>
<p class="flex justify-end font-lights my-0">
<span>Sortie initial le {entry.data.created.toLocaleDateString('fr')}</span>