backend:
  name: git-gateway
  branch: main
  squash_merges: true
media_folder: "/src/images"
slug:
  encoding: "ascii"
  clean_accents: true
collections:
  - name: "about"
    label: "About Posts"
    label_singular: "About Post"
    folder: "/src/content/about"
    extension: "json"
    create: true
    identifier_field: "year"
    fields:
      - {
          label: "Year",
          name: "year",
          widget: "string",
          pattern: ['^\d{4}$', "Enter four-digit year"],
        }
      - {
          label: "Standard Text",
          name: "shortText",
          widget: "text",
          required: false,
          hint: "This is the text that is shown in the standard (unextended) version. If this text is left empty, the whole post is hidden from the standard version.",
        }
      - {
          label: "Extended Text",
          name: "longText",
          widget: "text",
          required: false,
          hint: "This is the text that is shown in the extended version. If this text is left empty, the standard text will be shown instead.",
        }
      - { label: "Image", name: "image", widget: "image", required: false }
      - {
          label: "Alt Text",
          name: "imageText",
          widget: "string",
          required: false,
        }
      - {
          label: "Credits",
          name: "imageCredit",
          widget: "string",
          required: false,
          hint: "Adds '© Photo by {your input here}' under the image",
        }
  - name: "events"
    label: "Events"
    label_singular: "Event"
    folder: "/src/content/events"
    extension: "json"
    create: true
    slug: "{{fields.startDate}}-{{slug}}"
    summary: "{{fields.startDate}} {{fields.title}}"
    fields:
      - { label: "Logo", name: "logo", widget: "image" }
      - { label: "Title", name: "title", widget: "string" }
      - {
          label: "Start date",
          name: "startDate",
          widget: "datetime",
          date_format: "YYYY-MM-DD",
          default: "{{now}}",
        }
      - {
          label: "End date",
          name: "endDate",
          widget: "datetime",
          date_format: "YYYY-MM-DD",
          default: "{{now}}",
        }
      - { label: "Location", name: "location", widget: "string" }
      - { label: "Website", name: "website", widget: "string" }
    sortable_fields: ["title", "startDate"]
    view_groups:
      - label: "Year"
        field: "startDate"
        pattern: '\d{4}'
      - label: "Country"
        field: "location"
        pattern: '\w+$'
  - name: "instagram"
    label: "Instagram Posts"
    label_singular: "Instagram Post"
    folder: "/src/content/instagram"
    extension: "json"
    create: true
    identifier_field: "date"
    fields:
      - {
          label: "Date",
          name: "date",
          widget: "datetime",
          date_format: "YYYY-MM-DD",
          default: "{{now}}",
        }
      - { label: "Link", name: "url", widget: "string" }
      - { label: "Image", name: "image", widget: "image" }
      - { label: "Alt Text", name: "imageText", widget: "string" }
    sortable_fields: ["date"]
  - name: "news"
    label: "News Posts"
    label_singular: "News Post"
    folder: "/src/content/news"
    extension: "md"
    create: true
    slug: "{{fields.date}}-{{slug}}"
    summary: "{{fields.date}} {{fields.title}}"
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - {
          label: "Date",
          name: "date",
          widget: "datetime",
          date_format: "YYYY-MM-DD",
          default: "{{now}}",
        }
      - { label: "Image", name: "image", widget: "image" }
      - { label: "Alt Text", name: "imageText", widget: "string" }
      - {
          label: "Preview",
          name: "description",
          widget: "text",
          hint: "The text showing in the news feed. This is usually the first paragraph of the full post.",
        }
      - { label: "Body", name: "body", widget: "markdown" }
    sortable_fields: ["title", "date"]
    view_groups:
      - label: "Year"
        field: "date"
        pattern: '\d{4}'
  - name: "sponsors"
    label: "Sponsors"
    label_singular: "Sponsor"
    folder: "/src/content/sponsors"
    extension: "json"
    create: true
    identifier_field: "name"
    summary: "{{fields.order}} {{fields.name}}"
    fields:
      - {
          label: "Order",
          name: "order",
          widget: "number",
          value_type: "int",
          min: 1,
          max: 99,
        }
      - { label: "Image", name: "image", widget: "image" }
      - { label: "Name", name: "name", widget: "string" }
      - { label: "Description", name: "description", widget: "text" }
    sortable_fields: ["order", "name"]
  - name: "team"
    label: "Team Members"
    label_singular: "Team Member"
    folder: "/src/content/team"
    extension: "json"
    create: true
    identifier_field: "name"
    summary: "{{fields.order}} {{fields.name}}"
    fields:
      - {
          label: "Order",
          name: "order",
          widget: "number",
          value_type: "int",
          min: 1,
          max: 99,
        }
      - { label: "Image", name: "image", widget: "image" }
      - { label: "Name", name: "name", widget: "string" }
      - { label: "Role", name: "role", widget: "string" }
      - { label: "Description", name: "description", widget: "text" }
    sortable_fields: ["order", "name"]
  - name: "text"
    label: "Webpage Text"
    folder: "/src/content/text"
    extension: "md"
    create: false
    identifier_field: "id"
    fields:
      - { label: "Identifier", name: "id", widget: "hidden" }
      - { label: "Body", name: "body", widget: "markdown" }
