backend:
  # name: proxy
  name: git-gateway
  # proxy_url: http://localhost:8081/api/v1
  branch: v2
# This line should *not* be indented
# publish_mode: editorial_workflow
media_folder: '/static/img/uploads'
public_folder: '/img/uploads'

media_library:
  name: uploadcare
  config:
    publicKey: 9035764b88ff17eb6897

collections:
  - name: 'blog' # Used in routes, e.g., /admin/collections/blog
    label: 'Blog' # Used in the UI
    folder: 'src/content/_blogs' # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: '{{year}}-{{month}}-{{day}}-{{slug}}' # Filename template, e.g., YYYY-MM-DD-title.md
    fields: # The fields for each document, usually in front matter
      - { label: 'Type', name: 'type', widget: 'hidden', default: 'BlogPost' }
      - {
          label: 'Language',
          name: 'language',
          widget: 'select',
          options:
            [
              { label: 'English', value: 'en' },
              { label: 'French', value: 'fr' },
            ],
        }
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Publish Date', name: 'date', widget: 'datetime' }
      - {
        label: 'Images',
        name: 'images',
        widget: 'list',
        required: false,
        field: { widget: 'image' }
      }
      - { label: 'Excerpt', name: 'excerpt', widget: 'markdown' } 
      - { label: 'Body', name: 'body', widget: 'markdown' }

  - name: 'content-block' # Used in routes, e.g., /admin/collections/blog
    label: 'Content block' # Used in the UI
    folder: 'src/content/_blocks' # The path to the folder where the documents are stored
    identifier_field: displayName
    create: true # Allow users to create new documents in this collection
    slug: '{{year}}-{{month}}-{{day}}-{{slug}}' # Filename template, e.g., YYYY-MM-DD-title.md
    fields: # The fields for each document, usually in front matter
      - { label: 'Type', name: 'type', widget: 'hidden', default: 'ContentBlock' }
      - { label: 'Display name', name: 'displayName', widget: 'string' }
      - { label: 'Tags', name: 'tags', widget: 'list', allow_add: true }
      - {
          label: 'Language',
          name: 'language',
          widget: 'select',
          options:
            [
              { label: 'English', value: 'en' },
              { label: 'French', value: 'fr' },
            ],
        }
      - { label: 'Title', name: 'title', widget: 'string', required: false }
      - { label: 'Subtitle', name: 'subtitle', widget: 'string', required: false }
      - {
          label: 'Images',
          name: 'images',
          widget: 'list',
          required: false,
          field: { widget: 'image' }
        }
      - { label: 'Short text', name: 'excerpt', widget: 'markdown', required: false } 
      - { label: 'Body', name: 'body', widget: 'markdown', required: false }
      - { label: 'Link to', name: 'link', widget: 'string', required: false }
      - {
          label: 'Entries', 
          name: 'entries', 
          widget: 'list',
          fields: [
            { label: 'Title', name: 'title', widget: 'string' },
            { label: 'Tags', name: 'tags', widget: 'list', allow_add: true },
            { label: 'Subtitle', name: 'subtitle', widget: 'string', required: false },
            { label: 'Text', name: 'text', widget: 'markdown', required: false },
            {
              label: 'Images',
              name: 'images',
              widget: 'list',
              required: false,
              field: { widget: 'image' }
            },
            { label: 'Link', name: 'link', widget: 'string', required: false },
          ]
      }

  - name: 'page' # Used in routes, e.g., /admin/collections/blog
    label: 'Page' # Used in the UI
    folder: 'src/content/_pages' # The path to the folder where the documents are stored
    create: false # Allow users to create new documents in this collection
    fields: # The fields for each document, usually in front matter
      - { label: 'Title', name: 'title', widget: 'string', required: false }
      - { label: 'Tags', name: 'tags', widget: 'list', allow_add: true }
      - {
          label: 'Language',
          name: 'language',
          widget: 'select',
          options:
            [
              { label: 'English', value: 'en' },
              { label: 'French', value: 'fr' },
            ],
        }
      - {
          label: 'Blocks', 
          name: 'blocks', 
          widget: 'list',
          fields: [
            { label: 'Display name', name: 'displayName', widget: 'string'},
            {
              label: 'Type', 
              name: 'blockType', 
              widget: 'select',
              options: ['heading', 'article', 'fullwidth-left-aligned-media', 'slideshow', 'full-page-heading']
            },
            { label: 'Title', name: 'title', widget: 'string', required: false },
            { label: 'Subtitle', name: 'subtitle', widget: 'string', required: false },
            { label: 'Excerpt', name: 'excerpt', widget: 'markdown' },
            {
              label: 'Images',
              name: 'images',
              widget: 'image',
              required: false
            }
          ]
      }
      - {
          label: 'Language',
          name: 'language',
          widget: 'select',
          options:
            [
              { label: 'English', value: 'en' },
              { label: 'French', value: 'fr' },
            ],
        }
      - {
          label: 'Featured Image',
          name: 'thumbnail',
          widget: 'image',
          required: false,
        }
      - { label: 'Url', name: 'url', widget: 'string', required: true }