feat: pages collection (privacy/disclaimer/contact) editable in CMS
This commit is contained in:
@@ -35,3 +35,17 @@ collections:
|
|||||||
- { name: cover, label: "Okładka", widget: image, required: false }
|
- { name: cover, label: "Okładka", widget: image, required: false }
|
||||||
- { name: draft, label: "Szkic (nieopublikowany)", widget: boolean, default: false }
|
- { name: draft, label: "Szkic (nieopublikowany)", widget: boolean, default: false }
|
||||||
- { name: body, label: "Treść", widget: markdown }
|
- { name: body, label: "Treść", widget: markdown }
|
||||||
|
|
||||||
|
- name: pages
|
||||||
|
label: "Pages"
|
||||||
|
label_singular: "Page"
|
||||||
|
folder: "src/content/pages"
|
||||||
|
create: true
|
||||||
|
slug: "{{slug}}"
|
||||||
|
extension: md
|
||||||
|
format: frontmatter
|
||||||
|
summary: "{{title}}"
|
||||||
|
fields:
|
||||||
|
- { name: title, label: "Title", widget: string }
|
||||||
|
- { name: description, label: "Description", widget: text, required: false }
|
||||||
|
- { name: body, label: "Body", widget: markdown }
|
||||||
|
|||||||
+12
-1
@@ -19,4 +19,15 @@ const news = defineCollection({
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const collections = { news };
|
// Static portal pages (privacy, disclaimer, contact…) — separate collection
|
||||||
|
// because the content type differs (no dates/covers/categories), and editors
|
||||||
|
// get a distinct "Pages" section in the CMS.
|
||||||
|
const pages = defineCollection({
|
||||||
|
loader: glob({ pattern: '**/*.md', base: './src/content/pages' }),
|
||||||
|
schema: z.object({
|
||||||
|
title: z.string(),
|
||||||
|
description: z.string().optional(),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const collections = { news, pages };
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
title: Contact
|
||||||
|
description: How to reach the CTAO and the Science Portal team.
|
||||||
|
---
|
||||||
|
|
||||||
|
*Demo page — final wording will be provided by the CTAO Central Organisation.*
|
||||||
|
|
||||||
|
- **General enquiries:** see the contact section on [ctao.org](https://www.ctao.org/)
|
||||||
|
- **Science user support:** help desk, FAQ and user forum — via [User Support](/support) (integration planned)
|
||||||
|
- **Portal (technical):** SUSS Science Portal team
|
||||||
|
|
||||||
|
For media and outreach enquiries, please use the channels listed on the CTAO website.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
title: Disclaimer
|
||||||
|
description: Terms of use of the CTAO Science Portal.
|
||||||
|
---
|
||||||
|
|
||||||
|
*Demo page — final wording will be provided by the CTAO Central Organisation.*
|
||||||
|
|
||||||
|
The information on this portal is provided by the Cherenkov Telescope Array Observatory (CTAO)
|
||||||
|
for general information and scientific use. While we strive to keep content accurate and up to
|
||||||
|
date, the CTAO makes no warranties of any kind about the completeness, accuracy or reliability
|
||||||
|
of the information, software or data products made available here.
|
||||||
|
|
||||||
|
External links are provided for convenience; the CTAO is not responsible for the content of
|
||||||
|
external sites.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: Privacy statement
|
||||||
|
description: How the CTAO Science Portal handles personal data.
|
||||||
|
---
|
||||||
|
|
||||||
|
*Demo page — final wording will be provided by the CTAO Central Organisation.*
|
||||||
|
|
||||||
|
The CTAO Science Portal processes personal data only to the extent required to provide its
|
||||||
|
services: account information is managed by the central **CTAO AAI** system, and the portal
|
||||||
|
stores no passwords. Usage analytics, if any, are anonymised.
|
||||||
|
|
||||||
|
## Your rights
|
||||||
|
|
||||||
|
Under the GDPR you have the right to access, rectify, erase and port your personal data, and
|
||||||
|
to object to or restrict its processing. Requests are handled by the CTAO data protection
|
||||||
|
officer (contact details on the [Contact](/pages/contact) page).
|
||||||
@@ -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