feat: pages collection (privacy/disclaimer/contact) editable in CMS

This commit is contained in:
ctao
2026-07-24 23:11:57 +02:00
parent cf35739a64
commit a8c0e802e2
6 changed files with 88 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
---
import { getCollection, render } from 'astro:content';
import Base from '../../layouts/Base.astro';
export async function getStaticPaths() {
const pages = await getCollection('pages');
return pages.map((page) => ({ params: { slug: page.id }, props: { page } }));
}
const { page } = Astro.props;
const { Content } = await render(page);
---
<Base title={`${page.data.title} — CTAO Science Portal`} description={page.data.description}>
<article class="container article">
<h1>{page.data.title}</h1>
<div class="prose">
<Content />
</div>
</article>
</Base>