backend:
  name: github
  repo:
  branch: main
  commit_messages:
    create: 'feat(cms): Create {{collection}} "{{slug}}"'
    update: 'feat(cms): Update {{collection}} "{{slug}}"'
    delete: 'chore(cms): Delete {{collection}} "{{slug}}"'
    uploadMedia: 'chore(cms): Upload "{{path}}"'
    deleteMedia: 'chore(cms): Delete "{{path}}"'

local_backend: true

publish_mode: simple

media_folder: "public/uploads"
public_folder: "/uploads"

slug:
  encoding: "ascii"
  clean_accents: true
  sanitize_replacement: "-"

collections:
  - name: "berita"
    label: "Berita (News)"
    label_singular: "Berita"
    folder: "src/content/berita"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    sortable_fields: [date, title, author]
    fields:
      - { label: "Judul Berita", name: "title", widget: "string" }
      - { label: "Ringkasan Singkat", name: "description", widget: "text", hint: "Maksimal 160 karakter untuk SEO" }
      - { label: "Tanggal Publikasi", name: "date", widget: "datetime", format: "YYYY-MM-DD", date_format: "YYYY-MM-DD", time_format: false }
      - { label: "Penulis", name: "author", widget: "string", default: "Tim Fakultas Sosial Humaniora UHN" }
      - label: "Gambar Sampul (Maks. 800x800 px)"
        name: "image"
        widget: "image"
        required: false
        hint: "Gambar otomatis divalidasi dan di-resize agar tidak melebihi 800x800 px saat build"
      - label: "Tag"
        name: "tags"
        widget: "select"
        multiple: true
        required: false
        default: ["FSH", "Universitas Harkat Negeri"]
        options:
          - "FSH"
          - "Universitas Harkat Negeri"
          - "Prestasi"
          - "Kegiatan"
          - "Kerja Sama"
      - { label: "Tandai sebagai Berita Utama", name: "featured", widget: "boolean", default: false, required: false }
      - { label: "Isi Berita (Markdown)", name: "body", widget: "markdown" }

  - name: "pengumuman"
    label: "Pengumuman (Announcements)"
    label_singular: "Pengumuman"
    folder: "src/content/pengumuman"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    sortable_fields: [date, title, author]
    fields:
      - { label: "Judul Pengumuman", name: "title", widget: "string" }
      - { label: "Ringkasan Singkat", name: "description", widget: "text", hint: "Maksimal 160 karakter untuk SEO" }
      - { label: "Tanggal Publikasi", name: "date", widget: "datetime", format: "YYYY-MM-DD", date_format: "YYYY-MM-DD", time_format: false }
      - { label: "Penulis", name: "author", widget: "string", default: "Sekretariat Fakultas Sosial Humaniora UHN" }
      - { label: "Isi Pengumuman (Markdown)", name: "body", widget: "markdown" }