backend:
  name: git-gateway
  branch: main # Branch to update (optional; defaults to master)

local_backend: false

publish_mode: editorial_workflow
media_library:
  name: cloudinary
  config:
    cloud_name: demingfactor
    api_key: 241867978174468

collections:
  - name: "case-studies" # Used in routes, e.g., /admin/collections/blog
    label: "Case Studies" # Used in the UI
    folder: "/src/cms/case-studies" # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
    fields: # The fields for each document, usually in front matter
      - {label: "Layout", name: "layout", widget: "hidden", default: "layouts/cms/article.html"}
      - {label: "Page Title", name: "title", widget: "string", pattern: ['^[\s\S]{1,110}$', 'Please keep your title to under 110 characters!']}
      - {label: "Header Title", name: "content-title", widget: "string", pattern: ['^[\s\S]{1,110}$', 'Please keep your title to under 110 characters!']}
      - {label: "Subtitle", name: "content-subtitle", widget: "string", required: false, pattern: ['^[\s\S]{1,140}$', 'Please keep your title to under 140 characters!']}
      - {label: "Focus Image", name: "focus-image", widget: "image", required: true}
      - {label: "Page Slug", name: "slug", widget: "string", pattern: ['^[a-z0-9/]+(?:-[a-z0-9]+)*$', 'A slug can have no spaces or special characters']}
      - {label: "Publish Date", name: "date", widget: "datetime"}
      - {label: "Permalink", name: "permalink", widget: "hidden", default: "/{{slug}}/index.html"}
      - {label: "Header Background", name: "header-colour", widget: "color", default: "#B2FFF8"}
      - {label: "Header Font", name: "font-colour", widget: "color", default: "#3626A7"}
      - {label: "Content Colour", name: "content-colour", widget: "color", default: "#FFFFFF"}
      - {label: "Content Font Colour", name: "content-font-colour", widget: "color", default: "#FFFFFF"}
      - {label: "Body", name: "body", widget: "markdown"}
  - name: "blog" # Used in routes, e.g., /admin/collections/blog
    label: "Blog Posts" # Used in the UI
    folder: "/src/cms/blog" # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
    fields: # The fields for each document, usually in front matter
      - {label: "Layout", name: "layout", widget: "hidden", default: "layouts/cms/page.html"}
      - {label: "Type", name: "type", widget: "hidden", default: "blog"}
      - {label: "Backlink", name: "backlink", widget: "hidden", default: "/blog/"}
      - {label: "Title", name: "title", widget: "string", pattern: ['^[\s\S]{1,110}$', 'Please keep your title to under 110 characters!']}
      - {label: "Subtitle", name: "subtitle", widget: "string", required: false, pattern: ['^[\s\S]{1,140}$', 'Please keep your title to under 140 characters!']}
      - {label: "Author", name: "author", widget: "string", required: false, pattern: ['^[\s\S]{1,140}$', 'Please keep your title to under 140 characters!']}
      - {label: "Page Slug", name: "slug", widget: "string", pattern: ['^[a-z0-9/]+(?:-[a-z0-9]+)*$', 'A slug can have no spaces or special characters']}
      - {label: "Topics", name: "tags", widget: "relation", collection: "topics", value_field: "topic", search_fields: ["title"], display_fields: ["title"], multiple: true}
      - {label: "Publish Date", name: "date", widget: "datetime"}
      - {label: "Permalink", name: "permalink", widget: "hidden", default: "/blog/{{slug}}/index.html"}
      - {label: "Body", name: "body", widget: "markdown"}
  - name: "topics"
    label: "Topics"
    folder: "/src/cms/topics"
    create: true
    slug: "{{topic}}"
    fields:
      - {label: "Layout", name: "layout", widget: "hidden", default: "layouts/cms/topics.html"}
      - {label: "Type", name: "type", widget: "hidden", default: "topic"}
      - {label: "Topic Name", name: "title", widget: "string"}
      - {label: "Topic Slug", name: "topic", widget: "string", pattern: ['^[a-z0-9]+(?:-[a-z0-9]+)*$', 'A slug can have no spaces or special characters']}
      - {label: "Permalink", name: "permalink", widget: "hidden", default: "/topics/{{ topic }}/index.html"}
  - name: "pages" # Used in routes, e.g., /admin/collections/blog
    label: "Basic Page" # Used in the UI
    folder: "/src/cms/pages" # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
    fields: # The fields for each document, usually in front matter
      - {label: "Layout", name: "layout", widget: "hidden", default: "layouts/cms/page.html"}
      - {label: "Type", name: "type", widget: "hidden", default: "page"}
      - {label: "Title", name: "title", widget: "string", pattern: ['^[\s\S]{1,110}$', 'Please keep your title to under 110 characters!']}
      - {label: "Subtitle", name: "subtitle", widget: "string", required: false, pattern: ['^[\s\S]{1,140}$', 'Please keep your title to under 140 characters!']}
      - {label: "Page Slug", name: "slug", widget: "string", pattern: ['^[a-z0-9/]+(?:-[a-z0-9]+)*$', 'A slug can have no spaces or special characters']}
      - {label: "Permalink", name: "permalink", widget: "hidden", default: "/{{slug}}/index.html"}
      - {label: "Body", name: "body", widget: "markdown"}