feat: pages collection (privacy/disclaimer/contact) editable in CMS
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user