sections:
  page_titles:
    display: 'Page meta'
    fields:
      -
        handle: section_title
        field:
          type: section
          instructions: 'Website and page titles'
          display: Title
      -
        handle: title_separator
        field:
          options:
            ' | ': '|'
            ' - ': '-'
            ' / ': /
            ' :: ': '::'
            ' > ': '>'
            ' ~ ': '~'
          clearable: false
          multiple: false
          searchable: true
          localizable: true
          taggable: false
          push_tags: false
          cast_booleans: false
          type: select
          instructions: 'Select the character to separate the page title and site title.'
          instructions_position: below
          width: 33
          listable: hidden
          display: Separator
      -
        handle: site_name
        field:
          input_type: text
          type: text
          localizable: true
          listable: hidden
          display: 'Website title'
          instructions: "The title for the website. Defaults to Laravel's App Name."
          instructions_position: below
          width: 66
      -
        handle: change_page_title
        field:
          fields:
            -
              handle: collection
              field:
                max_items: 1
                mode: select
                display: Collection
                type: collections
                icon: collections
                instructions: 'The collection you want to change the title for.'
                width: 33
                listable: hidden
            -
              handle: what_to_add
              field:
                options:
                  custom_text: 'Custom text'
                  collection_title: 'The collection title'
                multiple: false
                max_items: 1
                clearable: false
                searchable: false
                taggable: false
                push_tags: false
                cast_booleans: false
                display: 'What to add'
                type: select
                icon: select
                instructions: 'What to add.'
                width: 33
                listable: hidden
            -
              handle: custom_text
              field:
                input_type: text
                antlers: false
                display: Text
                type: text
                icon: text
                instructions: 'The custom text.'
                width: 33
                listable: hidden
                if:
                  what_to_add: 'equals custom_text'
          mode: table
          add_row: 'Add collection default'
          reorderable: true
          type: grid
          icon: grid
          localizable: true
          display: 'Change collection title'
          instructions: 'Select collections where you want to add something to be part of the page title. For example: _Entry title - **Collection title** - Site title_.'
          listable: hidden
      -
        handle: section_environments_noindex
        field:
          type: section
          instructions: 'When to noindex and nofollow by default.'
          display: Environments
      -
        handle: noindex_local
        field:
          type: toggle
          instructions_position: below
          listable: false
          display: Local
          width: 33
      -
        handle: noindex_staging
        field:
          type: toggle
          instructions_position: below
          listable: false
          display: Staging
          width: 33
      -
        handle: noindex_production
        field:
          type: toggle
          instructions_position: below
          listable: false
          display: Production
          width: 33
      -
        handle: section_description
        field:
          type: section
          instructions: "Set fallback data per collection to use as meta, OG and Twitter descriptions when users don't fill in those fields."
          display: Descriptions
      -
        handle: collection_defaults
        field:
          fields:
            -
              handle: collection
              field:
                max_items: 1
                mode: select
                display: Collection
                type: collections
                icon: collections
                instructions: 'The collection for this fallback.'
                instructions_position: below
                width: 33
                listable: hidden
            -
              handle: fallback
              field:
                options:
                  field: 'Custom field'
                  custom_text: 'Custom text'
                  page_builder: 'First text in page builder'
                multiple: false
                max_items: 1
                clearable: false
                searchable: false
                taggable: false
                push_tags: false
                cast_booleans: false
                display: Fallback
                type: select
                icon: select
                instructions: 'The fallback type'
                instructions_position: below
                width: 33
                listable: hidden
            -
              handle: field_handle
              field:
                input_type: text
                antlers: false
                display: 'Field handle'
                type: text
                icon: text
                instructions: 'The custom field handle.'
                instructions_position: below
                width: 33
                listable: hidden
                if:
                  fallback: 'equals field'
            -
              handle: custom_text
              field:
                character_limit: '160'
                antlers: false
                display: 'Custom text'
                type: textarea
                icon: textarea
                instructions: 'The custom text. Max 160 characters.'
                instructions_position: below
                width: 33
                listable: hidden
                if:
                  fallback: 'equals custom_text'
          mode: stacked
          add_row: 'Add collection default'
          reorderable: true
          display: 'Collection defaults'
          type: grid
          icon: grid
          instructions: 'Set fallback meta descriptions for each collection.'
          listable: hidden
  social:
    display: 'Social Sharing'
    fields:
      -
        handle: section_og
        field:
          type: section
          instructions: 'Default settings for Social Sharing.'
          display: Defaults
      -
        handle: og_image
        field: common.image
        config:
          container: social
          localizable: true
          listable: hidden
          display: 'Social Images'
          instructions_position: below
          instructions: 'The default OG image. Can be overridden per entry. The recommended size is 1200px x 630px. This image will be focal cropped to this dimension.'
          width: 50
      -
        handle: twitter_image
        field: common.image
        config:
          container: social
          localizable: true
          listable: hidden
          display: 'Twitter image'
          instructions_position: below
          instructions: 'The default Twitter image. Can be overridden per entry. 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
      -
        handle: twitter_handle
        field:
          listable: hidden
          display: 'Twitter handle'
          width: 50
          input_type: text
          type: text
          localizable: true
          instructions: 'The Twitter user name that should be included with Twitter Card tags.'
          instructions_position: below
          prepend: '@'
          antlers: false
  sitemap:
    display: Sitemap
    fields:
      -
        handle: section_sitemap
        field:
          type: section
          instructions: 'Configure the sitemap.xml'
          display: Sitemap
      -
        handle: sitemap_collections
        field:
          mode: select
          type: collections
          instructions: 'Select which collections to include in the sitemap.xml.'
          listable: hidden
          default: pages
          display: Collections
  trackers:
    display: Trackers
    fields:
      -
        handle: section_environments
        field:
          type: section
          instructions: 'When to render tracker tags.'
          display: Environments
      -
        handle: trackers_local
        field:
          type: toggle
          listable: false
          display: Local
          width: 33
      -
        handle: trackers_staging
        field:
          type: toggle
          listable: false
          display: Staging
          width: 33
      -
        handle: trackers_production
        field:
          type: toggle
          listable: false
          display: Production
          width: 33
      -
        handle: section_verification
        field:
          type: section
          instructions: 'Configure site verifications.'
          display: 'Site verifications'
      -
        handle: use_google_site_verification
        field:
          type: toggle
          instructions: 'Add a google-site-verification meta tag to your head.'
          listable: false
          display: 'Google site verification'
      -
        handle: google_site_verification
        field:
          input_type: text
          type: text
          listable: hidden
          width: 66
          display: 'Verification key'
          validate:
            - 'required_if:use_google_site_verification,true'
          if:
            use_google_site_verification: 'equals true'
      -
        handle: section_tracker_consent
        field:
          type: section
          instructions: 'Configure Google trackers and scripts and optionally inject them after cookie consent.'
          display: 'Tracker consent'
          instructions_position: above
          listable: hidden
          visibility: visible
          always_save: false
      -
        handle: tracker_type
        field:
          options:
            none: None
            gtag: 'Google Analytics'
            gtm: 'Google Tag Manager'
          default: none
          type: button_group
          instructions: 'The type of tracking you want added on each page.'
          listable: false
          display: 'Tracker type'
          instructions_position: above
          visibility: visible
          always_save: false
      -
        handle: google_analytics
        field:
          width: 50
          display: 'Tracking ID'
          input_type: text
          type: text
          instructions: "*Note: if you don't anonymize IP's you need cookie consent in the EU."
          instructions_position: below
          listable: hidden
          validate:
            - 'required_if:tracker_type,gtag'
          if:
            tracker_type: 'equals gtag'
      -
        handle: anonymize_ip
        field:
          type: toggle
          width: 50
          listable: false
          default: true
          display: "Anonymize IP's"
          instructions: 'Enable this to be exempt from needing cookie consent.'
          instructions_position: below
          if:
            tracker_type: 'equals gtag'
      -
        handle: google_tag_manager
        field:
          input_type: text
          type: text
          listable: hidden
          width: 50
          display: 'Tracking ID'
          instructions_position: below
          validate:
            - 'required_if:tracker_type,gtm'
          if:
            tracker_type: 'equals gtm'
