backend:
  name: git-gateway
  repo: Tipperary-Lawn-Tennis-Club/TLTC-Website
  branch: main

media_folder: "/src/assets/images"
public_folder: "/src/assets/images"

collections:
  - name: "news"
    label: "News"
    folder: "src/content/news"
    create: true
    edit: true
    delete: true
    update: true
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Publish Date", name: "date", widget: "datetime" }
      - { label: "Featured Image", name: "thumbnail", widget: "image" }
      - { label: "Image Alt Text", name: "alt", widget: "string" }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "policies"
    label: "Policies"
    folder: "src/content/policies"
    create: true
    edit: true
    delete: true
    update: true
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Date", name: "date", widget: "datetime" }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "rules"
    label: "Rules"
    folder: "src/content/rules"
    create: true
    edit: true
    delete: true
    update: true
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Date", name: "date", widget: "datetime" }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "committee"
    label: "Committee Member"
    folder: "src/content/committee"
    create: true
    edit: true
    delete: true
    update: true
    fields:
      - { label: "Name", name: "title", widget: "string" }
      - { label: "Position", name: "position", widget: "string" }
      - { label: "Image", name: "image", widget: "image" }
      - { label: "Alt Text", name: "alt", widget: "string" }
      - { label: "email", name: "email", widget: "string", required: false }
      - { label: "Body", name: "body", widget: "markdown", required: false }

  - name: "photos"
    label: "Photos"
    folder: "src/content/photos"
    create: true
    edit: true
    delete: true
    update: true
    slug: "{{slug}}"
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Date", name: "date", widget: "datetime" }
      - {
          label: "Images",
          name: "images",
          widget: "list",
          fields:
            [
              { label: "Image", name: "image", widget: "image" },
              { label: "Alt Text", name: "alt", widget: "string" },
              {
                label: "Description",
                name: "description",
                widget: "markdown",
                required: false,
              },
            ],
        }
