# Sveltia CMS — Unique Vietnam (https://www.unique-vietnam.vn)
# Edits commit straight to the `main` branch of malte/website_unique_vietnam on
# git.unique-landuse.de. After saving, the site must be rebuilt/redeployed
# (npm run build → deploy.sh) for changes to appear live.

backend:
  name: gitea
  repo: malte/website_unique_vietnam
  branch: main
  base_url: https://git.unique-landuse.de
  api_root: https://git.unique-landuse.de/api/v1
  app_id: 703bccdf-122c-4dc6-8bba-c45776c551f5

# Required by the schema. Photos are referenced by path (/images/pots/<file>),
# edited as plain text — no uploads needed.
media_folder: "public/images/pots"
public_folder: "/images/pots"

site_url: https://www.unique-vietnam.vn
display_url: https://www.unique-vietnam.vn

collections:
  - name: species
    label: "Species"
    icon: forest
    files:
      - name: species_list
        label: "Nursery species"
        file: "src/data/species.json"
        description: >-
          The native-species portfolio shown on the Cam Lo nursery page.
          Each entry is bilingual (English + Vietnamese). After saving, the
          site is rebuilt to go live.
        fields:
          - name: items
            label: "Species"
            label_singular: "Species"
            widget: list
            summary: "{{fields.latin}}  ·  {{fields.vernacular}}"
            fields:
              - { name: latin, label: "Latin name", widget: string }
              - { name: vernacular, label: "Vietnamese name", widget: string }
              - name: category
                label: "Category"
                widget: select
                options: ["coastal", "upland"]
                hint: "Groups the species on the page."
              - name: tube
                label: "Tube size"
                widget: select
                options: ["S", "M", "L"]
              - { name: months, label: "Months in nursery", widget: number, value_type: int, min: 0 }
              - { name: band, label: "Size/price band", widget: string, hint: "e.g. A, B, C, or a range like B/C" }
              - { name: image, label: "Photo path", widget: string, required: false, hint: "e.g. /images/pots/lim-xanh.png — leave blank for a styled placeholder." }
              - name: uses
                label: "Uses"
                widget: object
                fields:
                  - name: en
                    label: "English"
                    widget: list
                    field: { name: use, label: "Use", widget: string }
                  - name: vi
                    label: "Vietnamese"
                    widget: list
                    field: { name: use, label: "Use", widget: string }
              - name: note
                label: "Note (optional)"
                widget: object
                required: false
                collapsed: true
                fields:
                  - { name: en, label: "English", widget: string, required: false }
                  - { name: vi, label: "Vietnamese", widget: string, required: false }
