feat: Add first version of website

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
2023-10-01 02:25:21 +02:00
parent ed8dcebcb7
commit fe437165a1
49 changed files with 2220 additions and 457 deletions

View File

@ -0,0 +1,26 @@
---
import { getCollection } from 'astro:content';
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 },
}));
}
// 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}]}>
<h1>{entry.data.title}</h1>
<p class="flex justify-end font-lights my-0">
<span>Sortie initial le {entry.data.created.toLocaleDateString('fr')}</span>
<!-- <p>Software updated: {entry.data.updated.toLocaleDateString()}</p> -->
</p>
<Content />
</Article>