backend:
  name: github
  repo: mikz/zivotsbedou.cz
  preview_context: netlify/zivotsbedoucz/deploy-preview

publish_mode: editorial_workflow

display_url: https://www.zivotsbedou.cz

media_folder: src/img
public_folder: /img
collections:
  - name: 'blog'
    label: 'Blog (články)'
    folder: 'src/_posts/blog'
    create: true
    slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
    editor:
      preview: true
    fields:
      - { label: 'Image', name: 'image', widget: 'image', allow_multiple: false }
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Publish Date', name: 'date', widget: 'datetime', picker_utc: true }
      - { label: 'Author', name: 'author', widget: 'select', options: ['Linda', 'Natálie', 'Klára'], default: 'Linda', required: true }
      - { label: "Tags", name: "tags", widget: "list", default: [] }
      - { label: "Category", name: "category", widget: "relation",
          collection: "categories", search_fields: ['title', 'name'], value_field: 'name' }
      - { label: 'Description', name: 'description', widget: 'text' }
      - { label: 'Summary', name: 'summary', widget: 'markdown' }
      - { label: 'Body', name: 'body', widget: 'markdown' }
  - name: 'spolek'
    label: 'Spolek (stránky)'
    folder: 'src/_pages/spolek'
    create: true
    slug: '{{slug}}'
    editor:
      preview: true
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Link Title', name: 'link_title', widget: 'string', required: false }
      - { label: 'Date', name: 'date', widget: 'datetime', picker_utc: true, required: false }
      - { label: 'Area', name: 'area', widget: 'hidden', default: 'spolek' }
      - { label: 'Weight', name: 'weight', widget: 'number', value_type: 'int', default: 1 }
      - label: 'Menu'
        name: 'menu'
        widget: 'list'
        required: false
        fields:
          - { label: 'Section', name: 'section', widget: 'select', options: ['nav', 'sidebar', 'footer', 'main'] }
          - { label: 'Area', name: 'area', widget: 'select', options: ['spolek', 'blog', 'obchod', 'all'] }
          - { label: 'Weight', name: 'weight', widget: 'number', value_type: 'int', required: false }
      - { label: 'Menu Class', name: 'menu_class', widget: 'select', options: ['btn-primary text-white', 'btn-outline-primary'], required: false }
      - { label: 'Description', name: 'description', widget: 'text' }
      - { label: 'External URL', name: 'url', widget: 'string', required: false }
      - { label: 'Layout', name: 'layout', widget: 'string', required: false }
      - { label: 'Body', name: 'body', widget: 'markdown' }
  - name: 'blog_pages'
    label: 'Blog (stránky)'
    folder: 'src/_pages/blog'
    create: true
    slug: '{{slug}}'
    editor:
      preview: true
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Link Title', name: 'link_title', widget: 'string', required: false }
      - { label: 'Date', name: 'date', widget: 'datetime', picker_utc: true, required: false }
      - { label: 'Area', name: 'area', widget: 'hidden', default: 'blog' }
      - { label: 'Weight', name: 'weight', widget: 'number', value_type: 'int', default: 1 }
      - label: 'Menu'
        name: 'menu'
        widget: 'list'
        required: false
        fields:
          - { label: 'Section', name: 'section', widget: 'select', options: ['nav', 'sidebar', 'footer', 'main'] }
          - { label: 'Area', name: 'area', widget: 'select', options: ['spolek', 'blog', 'obchod', 'all'] }
          - { label: 'Weight', name: 'weight', widget: 'number', value_type: 'int', required: false }
      - { label: 'Menu Class', name: 'menu_class', widget: 'select', options: ['btn-primary text-white', 'btn-outline-primary'], required: false }
      - { label: 'Description', name: 'description', widget: 'text' }
      - { label: 'External URL', name: 'url', widget: 'string', required: false }
      - { label: 'Layout', name: 'layout', widget: 'string', required: false }
      - { label: 'Body', name: 'body', widget: 'markdown' }
  - name: 'obchod'
    label: 'Obchod (stránky)'
    folder: 'src/_pages/obchod'
    create: true
    slug: '{{slug}}'
    editor:
      preview: true
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Link Title', name: 'link_title', widget: 'string', required: false }
      - { label: 'Date', name: 'date', widget: 'datetime', picker_utc: true, required: false }
      - { label: 'Area', name: 'area', widget: 'hidden', default: 'obchod' }
      - { label: 'Weight', name: 'weight', widget: 'number', value_type: 'int', default: 1 }
      - label: 'Menu'
        name: 'menu'
        widget: 'list'
        required: false
        fields:
          - { label: 'Section', name: 'section', widget: 'select', options: ['nav', 'sidebar', 'footer', 'main'] }
          - { label: 'Area', name: 'area', widget: 'select', options: ['spolek', 'blog', 'obchod', 'all'] }
          - { label: 'Weight', name: 'weight', widget: 'number', value_type: 'int', required: false }
      - { label: 'Menu Class', name: 'menu_class', widget: 'select', options: ['btn-primary text-white', 'btn-outline-primary'], required: false }
      - { label: 'Description', name: 'description', widget: 'text' }
      - { label: 'External URL', name: 'url', widget: 'string', required: false }
      - { label: 'Layout', name: 'layout', widget: 'string', required: false }
      - { label: 'Body', name: 'body', widget: 'markdown' }
  - name: 'redirects'
    label: 'Redirects'
    editor:
      preview: false
    files:
      - name: 'redirects'
        label: 'Redirect Rules'
        file: 'src/_data/redirects.yml'
        fields:
          - label: 'Rules'
            name: 'rules'
            widget: 'list'
            summary: '{{fields.to}} ({{fields.status}})'
            fields:
              - label: 'From'
                name: 'from'
                widget: 'list'
                min: 1
                field: { label: 'Path', name: 'path', widget: 'string' }
              - { label: 'To', name: 'to', widget: 'string' }
              - { label: 'Status', name: 'status', widget: 'number', value_type: 'int', default: 301 }
              - { label: 'Force', name: 'force', widget: 'boolean', default: true, required: false }
              - { label: 'Preserve Query', name: 'preserve_query', widget: 'boolean', default: true, required: false }
  - name: 'mapa_data'
    label: 'Mapa Data'
    editor:
      preview: false
    files:
      - name: 'mapa_data'
        label: 'Mapa doporučení'
        file: 'src/_data/mapa.yml'
        fields:
          - label: 'Doporučení'
            name: 'recommended_people'
            widget: 'list'
            summary: '{{fields.name}}'
            fields:
              - { label: 'ID', name: 'id', widget: 'string', required: true }
              - { label: 'Jméno', name: 'name', widget: 'string', required: true }
              - { label: 'Popis', name: 'description', widget: 'text', required: true }
              - { label: 'Avatar', name: 'avatar', widget: 'image', allow_multiple: false, required: false }
              - { label: 'Kontakt URL', name: 'contact_url', widget: 'string', required: false }
              - { label: 'Kontakt Label', name: 'contact_label', widget: 'string', default: 'Kontakt', required: false }
              - { label: 'Publikováno', name: 'published', widget: 'boolean', default: true, required: false }
              - { label: 'Pořadí', name: 'order', widget: 'number', value_type: 'int', default: 10, required: false }
  - name: 'categories'
    label: 'Category'
    folder: 'src/_categories'
    create: true
    identifier_field: title
    slug: '{{slug}}'
    editor:
      preview: false
    fields:
      - { label: 'Title', name: 'title', widget: 'string', required: true }
      - { label: 'Name', name: 'name', widget: 'string' }
      - { label: 'Weight', name: 'weight', widget: 'number', value_type: 'int', default: 1 }
      - { label: "Frontpage", name: "frontpage", widget: "boolean", default: false, required: false }
      - { label: 'Image', name: 'image', widget: 'image', allow_multiple: false }
  - name: 'nemoci'
    label: 'Nemoci'
    folder: 'src/_nemoci'
    create: true
    identifier_field: title
    slug: '{{slug}}'
    editor:
      preview: false
    fields:
      - { label: 'Title', name: 'title', widget: 'string', required: true }
      - { label: 'Name', name: 'name', widget: 'string', required: true }
      - { label: 'Weight', name: 'weight', widget: 'number', value_type: 'int', default: 1 }
      - { label: "Frontpage", name: "frontpage", widget: "boolean", default: false, required: false }
      - { label: 'Image', name: 'image', widget: 'image', allow_multiple: false }
      - { label: 'Tag', name: 'tag', widget: 'string', required: true }
  - name: 'recipes'
    label: 'Recipes'
    folder: 'src/_recipes'
    create: true
    slug: '{{slug}}'
    identifier_field: title
    editor:
      preview: true
    fields:
      - { label: 'Image', name: 'image', widget: 'image' }
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Body', name: 'body', widget: 'markdown' }
