36 lines
1.5 KiB
YAML
36 lines
1.5 KiB
YAML
# 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 }
|