title: SEO
fields:
  -
    handle: section_basic
    field:
      type: section
      instructions: 'Basic SEO settings'
      display: Basic
  -
    handle: seo_title
    field:
      input_type: text
      type: text
      localizable: true
      listable: hidden
      display: 'Page title'
      character_limit: 70
      instructions: 'This entries title, defaults to title. Max 70 characters including the site name.'
  -
    handle: seo_description
    field: common.text_plain
    config:
      listable: hidden
      display: 'Meta description'
      character_limit: '160'
      instructions: 'This entries meta description. Max 160 characters.'
  -
    handle: section_advanced
    field:
      type: section
      instructions: 'Advanced SEO settings'
      display: Advanced
  -
    handle: seo_noindex
    field:
      type: toggle
      instructions: 'Instruct crawlers not to index this entry, also excludes it from the sitemap.xml.'
      instructions_position: below
      listable: hidden
      width: 50
      display: No-index
  -
    handle: seo_nofollow
    field:
      type: toggle
      instructions: 'Instruct crawlers not to follow links on this page.'
      instructions_position: below
      listable: hidden
      width: 50
      display: No-follow
  -
    handle: seo_canonical_type
    field:
      options:
        entry: 'Current entry'
        current: 'Current domain'
        external: 'External domain'
      display: 'Canonical URL'
      type: button_group
      default: entry
      icon: button_group
      instructions: 'Where should the canonical URL for this entry point to.'
      listable: hidden
  -
    handle: seo_canonical_current
    field: common.entry
    config:
      localizable: true
      listable: hidden
      display: 'Canonical URL'
      width: 66
      instructions: 'If this is an entry with duplicate content. Enter the original URL for this content.'
      validate:
        - 'required_if:seo_canonical_type,current'
      if:
        seo_canonical_type: 'equals current'
  -
    handle: seo_canonical_external
    field:
      input_type: url
      display: 'Canonical URL'
      type: text
      icon: text
      listable: hidden
      validate:
        - 'required_if:seo_canonical_type,external'
      if:
        seo_canonical_type: 'equals external'
  -
    handle: section_og
    field:
      type: section
      instructions: 'Open Graph meta tags for social sharing'
      display: 'Open Graph'
  -
    handle: og_title
    field:
      input_type: text
      type: text
      localizable: true
      listable: hidden
      display: 'Social title'
      instructions: 'This entries OG title, defaults to custom SEO title and title.'
  -
    handle: og_description
    field: common.text_plain
    config:
      listable: hidden
      display: 'Social description'
      instructions: 'This entries OG description, defaults to meta description.'
      width: 100
  -
    handle: og_image
    field: common.image
    config:
      mode: grid
      folder: meta
      restrict: true
      listable: true
      display: 'Social image'
      instructions_position: below
      instructions: 'This entries OG image. Defaults to global site OG image. The recommended size is 1200px x 630px. The image will be focal cropped to this dimension.'
      width: 50
  -
    handle: twitter_image
    field: common.image
    config:
      mode: grid
      folder: meta
      restrict: true
      listable: hidden
      display: 'Twitter image'
      instructions_position: below
      instructions: 'This entries Twitter image. Defaults to global site Twitter image. Images should have an aspect ratio of 2:1 with minimum dimensions of 300x157. This image will be focal cropped to this dimension.'
      width: 50
