CTAO portal demo (Astro + Sveltia)
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Sveltia/Decap CMS config. In production `backend` would be GitHub (editors log in
|
||||
# with GitHub, content committed to the repo). For this local demo we use the local
|
||||
# backend: edits are written straight to the Markdown files on disk via a local proxy.
|
||||
backend:
|
||||
name: github
|
||||
repo: ctao/portal-ctao # placeholder — unused in local mode
|
||||
branch: main
|
||||
|
||||
# Local editing without GitHub. The proxy runs on 8082 (8081 is taken by Metro) and
|
||||
# is reached same-origin at /api/v1 (proxied by Astro) so editing also works via the tunnel.
|
||||
local_backend:
|
||||
url: /api/v1
|
||||
|
||||
media_folder: "public/uploads" # relative to the proxy CWD (demo-git-cms/)
|
||||
public_folder: "/uploads"
|
||||
|
||||
collections:
|
||||
- name: news
|
||||
label: "Newsy"
|
||||
label_singular: "Artykuł"
|
||||
folder: "src/content/news"
|
||||
create: true
|
||||
slug: "{{slug}}"
|
||||
extension: md
|
||||
format: frontmatter
|
||||
summary: "{{title}} · {{date}}"
|
||||
fields:
|
||||
- { name: title, label: "Tytuł", widget: string }
|
||||
- { name: description, label: "Krótki opis", widget: text }
|
||||
- { name: date, label: "Data", widget: datetime, date_format: "YYYY-MM-DD", time_format: false }
|
||||
- { name: category, label: "Kategoria", widget: string, default: "news" }
|
||||
- { name: author, label: "Autor", widget: string, default: "CTAO" }
|
||||
- { name: cover, label: "Okładka", widget: image, required: false }
|
||||
- { name: draft, label: "Szkic (nieopublikowany)", widget: boolean, default: false }
|
||||
- { name: body, label: "Treść", widget: markdown }
|
||||
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>CTAO — Edytor treści</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Sveltia CMS: statyczny bundle admina. W demo ładowany z CDN; w produkcji
|
||||
wrzuca się go jako jeden statyczny plik obok strony (zero backendu). -->
|
||||
<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user