backend:
#  name: github
#  repo: easypeasycloud/website
  name: git-gateway
  branch: master

media_folder: "public/uploads" # Where media files will be stored
public_folder: "/uploads" # Where the media files can be accesed from the server
publish_mode: editorial_workflow # For Drafts

i18n:
  # Required and can be one of multiple_folders, multiple_files or single_file
  # multiple_folders - persists files in `<folder>/<locale>/<slug>.<extension>`
  # multiple_files - persists files in `<folder>/<slug>.<locale>.<extension>`
  # single_file - persists a single file in `<folder>/<slug>.<extension>`
  structure: multiple_files

  # Required - a list of locales to show in the editor UI
  locales: [en, it]

  # Optional, defaults to the first item in locales.
  # The locale to be used for fields validation and as a baseline for the entry.
  default_locale: en

collections:
  - name: "certification"
    label: "Certification"
    folder: "content/certifications"
    identifier_field: "name"
    slug: "{{name}}"
    i18n: true
    create: true
    multiple: true
    fields:
      - { label: "Name", name: "name", widget: "string", i18n: "duplicate" }
      - { label: "Description", name: "description", widget: "string", i18n: true }
      - { label: "Badge", name: "image", widget: "image", i18n: "duplicate" }
  - name: "author"
    label: "Author"
    folder: "content/authors"
    identifier_field: "slug"
    slug: "{{firstName}}-{{lastName}}"
    i18n: true
    create: true
    fields:
      - { label: "First Name", name: "firstName", widget: "string", i18n: "duplicate" }
      - { label: "Last Name", name: "lastName", widget: "string", i18n: "duplicate" }
      - { label: "Picture", name: "image", widget: "image", i18n: "duplicate" }
      - { label: "Email", name: "email", widget: "string", required: true, i18n: "duplicate" }
      - { label: "Job Role", name: "jobRole", widget: "string", required: true, i18n: "duplicate" }
      - { label: "Slug", name: "slug", widget: "string", i18n: "duplicate"}
      - {
          label: "Twitter Handle",
          name: "twitterHandle",
          widget: "string",
          required: false,
          i18n: "duplicate"
        }
      - {
          label: "LinkedIn Handle",
          name: "linkedinHandle",
          widget: "string",
          required: false,
          i18n: "duplicate"
        }

      - label: "Certifications"
        name: "certifications"
        widget: "list"
        summary: '{{fields.certification}}'
        i18n: true
        fields:
          - {
            label: "Certification",
            name: "certification",
            widget: "relation",
            collection: "certification",
            searchFields: ["name"],
            valueField: "name",
            displayFields: ["name"],
            i18n: "duplicate"
          }
          - label: "Proof"
            name: "proof"
            widget: "object"
            i18n: true
            fields:
              - {label: "URL", name: "link", widget: "string", hint: "(e.g. the Credly URL https://www.credly.com/badges/XXX) ", "required": false, i18n: "duplicate" }
              - {label: "Image", name: "image", widget: "image", "required": false, i18n: "duplicate"}
      - {label: "Meta Description", name: "metaDescription", widget: "string", i18n: true}
      - {
          label: "Excerpt", 
          name: "excerpt", 
          widget: "markdown",
          buttons: [ "bold", "italic" ],
          i18n: true
        }
      - {
          label: "Body", 
          name: "body", 
          widget: "markdown", 
          buttons: [ 
            "bold", "italic", "code", "link", "heading-three", 
            "heading-four", "heading-five", "heading-six", 
            "quote", "bulleted-list", "numbered-list"
          ], 
          i18n: true
        }
  - name: "category"
    label: "Blog Category"
    folder: "content/blog-categories"
    identifier_field: "slug"
    i18n: true
    create: true
    slug: "{{slug}}"
    fields:
      - {label: "Name", name: "name", widget: "string", i18n: true}
      - {label: "Slug", name: "slug", widget: "string", i18n: "duplicate"}
      - {label: "Meta Description", name: "metaDescription", widget: "string", i18n: true}
      - {label: "Description", name: "description", widget: "markdown", required: false, i18n: true}
  - name: "blog" # Used in routes, e.g., /admin/collections/blog
    label: "Blog Post" # Used in the UI
    folder: "content/blog-posts" # The path to the folder where the documents are stored
    identifier_field: "slug"
    i18n: true 
    create: true # Allow users to create new documents in this collection
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields: # The fields for each document, usually in front matter
      - {label: "Title", name: "title", widget: "string", i18n: true}
      - {
          label: "Author",
          name: "author",
          widget: "relation",
          collection: "author",
          searchFields: ["firstName", "lastName"],
          valueField: "slug",
          displayFields: ["{{firstName}} {{lastName}}"],
          i18n: "duplicate"
        }
      - {
          label: "Category",
          name: "category",
          widget: "relation",
          collection: "category",
          searchFields: ["name"],
          valueField: "name",
          displayFields: ["name"],
          i18n: "duplicate"
        }
      - {label: "Publish Date", name: "date", widget: "datetime", date_format: "YYYY-MM-DD", time_format: false, format: "YYYY-MM-DDTHH:mm:ssZ", i18n: "duplicate"}
      - {label: "Featured Image", name: "image", widget: "image", i18n: "duplicate"}
      - {label: "Slug", name: "slug", widget: "string", i18n: true}
      - {label: "Meta Description", name: "metaDescription", widget: "string", i18n: true}
      - {
          label: "Excerpt", 
          name: "excerpt", 
          widget: "markdown",
          buttons: [ "bold", "italic" ],
          i18n: true
        }
      - {
          label: "Body", 
          name: "body", 
          widget: "markdown", 
          buttons: [ 
            "bold", "italic", "code", "link", "heading-three", 
            "heading-four", "heading-five", "heading-six", 
            "quote", "bulleted-list", "numbered-list"
          ], 
          i18n: true
        }