backend:
  name: gitea
  repo: scbn/www
  branch: main
  app_id: 7bb5ea52-1123-4810-818c-370e1a958a7f
  api_root: https://git.scbn.ch/api/v1
  base_url: https://git.scbn.ch
  auth_endpoint: https://git.scbn.ch/login/oauth/authorize
publish_mode: simple
media_folder: "static/images/uploads"
public_folder: "/images/uploads"
site_url: "https://scbn.ch"
locale: fr

collections:
  - label: "Activités"
    name: "activite_autre"
    widget: "string"
    folder: "content/activite"
    preview_path: "activite/{{slug}}"
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    summary: "{{expiryDate}} {{title}} ({{type}})"
    sortable_fields: ["expiryDate", "type", "title"]
    create: true
    fields:
      - { label: "Titre", name: "title", widget: "string" }
      - { label: "Date", name: "expiryDate", widget: "datetime", date_format: "YYYY-MM-DD" }
      - { label: "Date publication", name: "publishDate", widget: "hidden", default: "{{now}}" }
      - { label: "Type", name: "type", widget: "select", default: "autre", options: [ski, camp, AG, autre] }
      - { label: "Contenu", name: "body", widget: "markdown", modes: [rich_text] }

  - label: "Nouvelles"
    name: "nouvelle"
    widget: "string"
    folder: "content/nouvelle"
    preview_path: "nouvelle/{{slug}}"
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    create: true
    fields:
      - { label: "Titre", name: "title", widget: "string" }
      - { label: "Date", name: "date", widget: "datetime", date_format: "YYYY-MM-DD" }
      - { label: "Date expiration", name: "expiryDate", widget: "datetime", date_format: "YYYY-MM-DD", required: false }
      - { label: "Contenu", name: "body", widget: "markdown", modes: [rich_text] }

  - label: "Pages"
    name: "pages"
    files:
      - label: "Accueil"
        name: "home"
        file: "content/_index.md"
        fields:
          - { label: Titre, name: title, widget: string }
          - { label: Contenu, name: body, widget: markdown, modes: [rich_text] }
      - label: "Le Club"
        name: "club"
        file: "content/club/_index.md"
        fields:
          - { label: Titre, name: title, widget: string }
          - { label: Contenu, name: body, widget: markdown, modes: [rich_text] }
      - label: "Contact"
        name: "contact"
        file: "content/contact/_index.md"
        fields:
          - { label: Titre, name: title, widget: string }
          - { label: Contenu, name: body, widget: markdown, modes: [rich_text] }
