# TRAINING SANDBOX COPY. Generated from main by the nightly reset.
# Saves go to the 'training' branch and never reach the real site.
# Decap CMS for PETI. Same pattern as The Waverly Collection.
# LOCAL DEMO: `npm run dev:cms`, then open http://localhost:3000/admin.
#   local_backend makes Decap write straight to the files on disk (no login).
# PRODUCTION: editors sign in through DecapBridge (email or Google, no GitHub
#   account needed). Every save commits to main and goes live after the Vercel
#   rebuild (about 1-2 minutes).
# DO NOT turn on publish_mode: editorial_workflow (breaks every entry).
# Every key in a content file must be declared here, or Decap can drop it on
# save. Run `npm run check:cms` after changing content files or this config.
local_backend: true

backend:
  name: git-gateway
  repo: rldonnell/peti
  branch: training
  auth_type: pkce
  base_url: https://auth.decapbridge.com
  auth_endpoint: /sites/2518287a-34c8-4967-9112-88e2fbc40c20/pkce
  auth_token_endpoint: /sites/2518287a-34c8-4967-9112-88e2fbc40c20/token
  gateway_url: https://gateway.decapbridge.com
  commit_messages:
    create: Create {{collection}} “{{slug}}” - {{author-name}} <{{author-login}}> via DecapBridge
    update: Update {{collection}} “{{slug}}” - {{author-name}} <{{author-login}}> via DecapBridge
    delete: Delete {{collection}} “{{slug}}” - {{author-name}} <{{author-login}}> via DecapBridge
    uploadMedia: Upload “{{path}}” - {{author-name}} <{{author-login}}> via DecapBridge
    deleteMedia: Delete “{{path}}” - {{author-name}} <{{author-login}}> via DecapBridge
    openAuthoring: Message {{message}} - {{author-name}} <{{author-login}}> via DecapBridge

auth:
  email_claim: email
  first_name_claim: first_name
  last_name_claim: last_name
  avatar_url_claim: avatar_url

logo_url: /icon.svg
site_url: https://training.peti.fyi
media_folder: "public/media/uploads"
public_folder: "/media/uploads"

collections:
  # ------------------------------------------------------------------ Blog
  - name: "blog"
    label: "Blog posts"
    label_singular: "Blog post"
    folder: "content/blog"
    create: true
    slug: "{{slug}}"
    sortable_fields: ["date", "title"]
    summary: "{{title}} ({{date}})"
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Publish date", name: "date", widget: "datetime", format: "YYYY-MM-DD", date_format: "YYYY-MM-DD", time_format: false }
      - { label: "Author", name: "author", widget: "string", hint: "Any insect, colony, or 'The PETI Desk'." }
      - { label: "Category", name: "category", widget: "select", options: ["Op-Ed", "Investigations", "Workplace", "Campaign Update", "Grievances", "Press Release"] }
      - { label: "Excerpt (blog list)", name: "excerpt", widget: "text" }
      - { label: "Google description", name: "description", widget: "text", hint: "Under 160 characters." }
      - { label: "Main photo", name: "image", widget: "image", hint: "Wide 16:9 photo. Upload with a new file name." }
      - { label: "Main photo description", name: "imageAlt", widget: "string" }
      - { label: "Content warning (optional)", name: "contentWarning", widget: "text", required: false, hint: "Shows in a yellow box above the post. Be dramatic." }
      - { label: "Body", name: "body", widget: "markdown" }

  # ------------------------------------------------------------- Campaigns
  - name: "campaigns"
    label: "Campaigns"
    label_singular: "Campaign"
    folder: "content/campaigns"
    extension: "json"
    format: "json"
    create: true
    slug: "{{slug}}"
    identifier_field: "title"
    summary: "{{order}}. {{title}} [{{status}}]"
    editor: { preview: false }
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Order (1 = first)", name: "order", widget: "number", value_type: "int", hint: "The homepage shows the first three." }
      - { label: "Stamp", name: "status", widget: "string", hint: "One word, stamped on the card: Urgent, Active, Winning..." }
      - { label: "One-line description", name: "dek", widget: "text" }
      - { label: "Photo", name: "image", widget: "image", hint: "4:3 landscape photo." }
      - { label: "Photo description", name: "imageAlt", widget: "string" }
      - { label: "Handwritten victim stat", name: "victims", widget: "string", hint: "Shows in red marker under the headline." }
      - { label: "Paragraphs", name: "body", widget: "list", field: { label: "Paragraph", name: "p", widget: "text" } }
      - { label: "Our demands", name: "demands", widget: "list", field: { label: "Demand", name: "d", widget: "string" } }

  # ----------------------------------------------------------------- Pages
  - name: "pages"
    label: "Pages"
    editor: { preview: false }
    files:
      - label: "Homepage"
        name: "home"
        file: "content/pages/home.json"
        fields:
          - { label: "Google title", name: "seoTitle", widget: "string" }
          - { label: "Google description", name: "seoDescription", widget: "text" }
          - { label: "Hero label", name: "heroEyebrow", widget: "string" }
          - { label: "Hero headline", name: "heroTitle", widget: "text", hint: "Press Enter for a new line. Wrap a word in *stars* for the red italic accent." }
          - { label: "Hero subheadline", name: "heroSubtitle", widget: "text" }
          - { label: "Hero photo", name: "heroImage", widget: "image", hint: "Wide landscape; the subject should sit on the right." }
          - { label: "Main button", name: "primaryButton", widget: "string" }
          - { label: "Second button", name: "secondaryButton", widget: "string" }
          - { label: "Counter caption", name: "counterLabel", widget: "string" }
          - { label: "Counter starting number", name: "counterStart", widget: "number", value_type: "int" }
          - { label: "Breaking-news ticker", name: "ticker", widget: "list", field: { label: "Headline", name: "t", widget: "string" } }
          - { label: "Manifesto label", name: "manifestoEyebrow", widget: "string" }
          - { label: "Manifesto heading", name: "manifestoHeading", widget: "text", hint: "Enter for new line, *stars* for accent." }
          - { label: "Manifesto paragraphs", name: "manifestoBody", widget: "list", field: { label: "Paragraph", name: "p", widget: "text" } }
          - label: "Big numbers"
            name: "stats"
            widget: "list"
            summary: "{{fields.value}}"
            fields:
              - { label: "Number", name: "value", widget: "string" }
              - { label: "Caption", name: "label", widget: "string" }
          - { label: "Outrage band label", name: "outrageEyebrow", widget: "string" }
          - { label: "Outrage band heading", name: "outrageHeading", widget: "text", hint: "Enter for new line, *stars* for accent." }
          - { label: "Outrage band text", name: "outrageBody", widget: "text" }
          - { label: "Outrage band button", name: "outrageButton", widget: "string" }
          - { label: "Campaigns heading", name: "campaignsHeading", widget: "string" }
          - { label: "Testimonials heading", name: "testimonialsHeading", widget: "string" }
          - label: "Insect testimonials"
            name: "testimonials"
            widget: "list"
            summary: "{{fields.name}} ({{fields.species}})"
            fields:
              - { label: "Name", name: "name", widget: "string" }
              - { label: "Species", name: "species", widget: "string" }
              - { label: "Quote", name: "quote", widget: "text" }
          - { label: "Blog heading", name: "blogHeading", widget: "string" }
          - { label: "Bottom banner heading", name: "ctaHeading", widget: "text" }
          - { label: "Bottom banner text", name: "ctaBody", widget: "text" }
          - { label: "Bottom banner button", name: "ctaButton", widget: "string" }

      - label: "About page"
        name: "about"
        file: "content/pages/about.json"
        fields:
          - { label: "Google title", name: "seoTitle", widget: "string" }
          - { label: "Google description", name: "seoDescription", widget: "text" }
          - { label: "Label", name: "eyebrow", widget: "string" }
          - { label: "Heading", name: "heading", widget: "text", hint: "Enter for new line, *stars* for accent." }
          - { label: "Intro", name: "intro", widget: "text" }
          - { label: "Mission heading", name: "missionHeading", widget: "string" }
          - { label: "Mission paragraphs", name: "mission", widget: "list", field: { label: "Paragraph", name: "p", widget: "text" } }
          - { label: "Grievances heading", name: "grievancesHeading", widget: "string" }
          - { label: "Grievances", name: "grievances", widget: "list", field: { label: "Grievance", name: "g", widget: "string" } }
          - { label: "Board heading", name: "boardHeading", widget: "string" }
          - { label: "Board photo", name: "boardImage", widget: "image" }
          - label: "Board members"
            name: "board"
            widget: "list"
            summary: "{{fields.name}}, {{fields.title}}"
            fields:
              - { label: "Name", name: "name", widget: "string" }
              - { label: "Title", name: "title", widget: "string" }
              - { label: "Species", name: "species", widget: "string" }
              - { label: "Bio", name: "bio", widget: "text" }
          - { label: "FAQ heading", name: "faqHeading", widget: "string" }
          - label: "FAQs"
            name: "faqs"
            widget: "list"
            summary: "{{fields.q}}"
            fields:
              - { label: "Question", name: "q", widget: "string" }
              - { label: "Answer", name: "a", widget: "text" }

      - label: "Outrage Machine page"
        name: "outrage"
        file: "content/pages/outrage.json"
        fields:
          - { label: "Google title", name: "seoTitle", widget: "string" }
          - { label: "Google description", name: "seoDescription", widget: "text" }
          - { label: "Label", name: "eyebrow", widget: "string" }
          - { label: "Heading", name: "heading", widget: "text", hint: "Enter for new line, *stars* for accent." }
          - { label: "Intro", name: "intro", widget: "text" }
          - { label: "Photo", name: "image", widget: "image" }
          - { label: "Button (first press)", name: "button", widget: "string" }
          - { label: "Button (after that)", name: "againButton", widget: "string" }
          - label: "Things to be offended by"
            name: "outrages"
            widget: "list"
            summary: "{{fields.thing}}"
            hint: "Reads as: [Thing] [because...]. One shows per button press, in random order."
            fields:
              - { label: "Thing", name: "thing", widget: "string" }
              - { label: "Because...", name: "because", widget: "text" }
          - { label: "Escalation heading", name: "escalationsHeading", widget: "string" }
          - { label: "Escalation actions", name: "escalations", widget: "list", field: { label: "Action", name: "a", widget: "string" } }
          - { label: "Outrage meter levels (low to high)", name: "meterLevels", widget: "list", field: { label: "Level", name: "l", widget: "string" } }
          - { label: "Privilege check heading", name: "privilegeHeading", widget: "string" }
          - { label: "Privilege check intro", name: "privilegeIntro", widget: "string" }
          - label: "Privilege questions"
            name: "privilegeQuestions"
            widget: "list"
            summary: "{{fields.q}} ({{fields.points}})"
            fields:
              - { label: "Question", name: "q", widget: "string" }
              - { label: "Points if Yes (can be negative)", name: "points", widget: "number", value_type: "int" }
          - { label: "Privilege result text", name: "privilegeResult", widget: "text", hint: "{score} is replaced with the number." }

      - label: "Inclusive Language Guide page"
        name: "language"
        file: "content/pages/language.json"
        fields:
          - { label: "Google title", name: "seoTitle", widget: "string" }
          - { label: "Google description", name: "seoDescription", widget: "text" }
          - { label: "Label", name: "eyebrow", widget: "string" }
          - { label: "Heading", name: "heading", widget: "text", hint: "Enter for new line, *stars* for accent." }
          - { label: "Intro", name: "intro", widget: "text" }
          - label: "Phrases"
            name: "pairs"
            widget: "list"
            summary: "{{fields.dont}} → {{fields.do}}"
            fields:
              - { label: "Instead of", name: "dont", widget: "string" }
              - { label: "Please say", name: "do", widget: "string" }
              - { label: "Because", name: "why", widget: "string" }
          - { label: "Accessibility heading", name: "accessibilityHeading", widget: "string" }
          - { label: "Accessibility commitments", name: "accessibility", widget: "list", field: { label: "Commitment", name: "c", widget: "text" } }

      - label: "Pledge page"
        name: "pledge"
        file: "content/pages/pledge.json"
        fields:
          - { label: "Google title", name: "seoTitle", widget: "string" }
          - { label: "Google description", name: "seoDescription", widget: "text" }
          - { label: "Label", name: "eyebrow", widget: "string" }
          - { label: "Heading", name: "heading", widget: "text" }
          - { label: "Intro", name: "intro", widget: "text" }
          - { label: "Pledges (checkboxes)", name: "pledges", widget: "list", field: { label: "Pledge", name: "p", widget: "string" } }
          - { label: "Petty-Meter label", name: "meterLabel", widget: "string" }
          - { label: "Petty-Meter levels (low to high)", name: "meterLevels", widget: "list", field: { label: "Level", name: "l", widget: "string" } }
          - { label: "Certificate title", name: "certificateTitle", widget: "string" }
          - { label: "Certificate text", name: "certificateBody", widget: "text" }
          - { label: "Button", name: "button", widget: "string" }

      - label: "Donate page"
        name: "donate"
        file: "content/pages/donate.json"
        fields:
          - { label: "Google title", name: "seoTitle", widget: "string" }
          - { label: "Google description", name: "seoDescription", widget: "text" }
          - { label: "Label", name: "eyebrow", widget: "string" }
          - { label: "Heading", name: "heading", widget: "text" }
          - { label: "Intro", name: "intro", widget: "text" }
          - { label: "Photo", name: "image", widget: "image" }
          - { label: "Slider label", name: "sliderLabel", widget: "string" }
          - label: "What your money buys"
            name: "conversions"
            widget: "list"
            summary: "${{fields.per}} = 1 {{fields.unit}}"
            fields:
              - { label: "Dollars per unit", name: "per", widget: "number", value_type: "int" }
              - { label: "Unit", name: "unit", widget: "string" }
          - label: "Giving levels"
            name: "tiers"
            widget: "list"
            summary: "{{fields.amount}} {{fields.title}}"
            fields:
              - { label: "Amount", name: "amount", widget: "string" }
              - { label: "Name", name: "title", widget: "string" }
              - { label: "Description", name: "description", widget: "text" }
          - { label: "Pop-up heading", name: "modalHeading", widget: "string" }
          - { label: "Pop-up text", name: "modalBody", widget: "text" }
          - { label: "Pop-up button", name: "modalButton", widget: "string" }

  # -------------------------------------------------------------- Settings
  - name: "settings"
    label: "Site settings"
    editor: { preview: false }
    files:
      - label: "Name, banner, menu, footer"
        name: "settings"
        file: "content/settings.json"
        fields:
          - { label: "Short name", name: "siteName", widget: "string" }
          - { label: "Full name", name: "longName", widget: "string" }
          - { label: "Tagline", name: "tagline", widget: "string" }
          - { label: "Yellow banner at top", name: "announcement", widget: "string", hint: "Leave blank to hide it." }
          - { label: "Footer one-liner", name: "footerQuip", widget: "string" }
          - { label: "Parody disclaimer", name: "disclaimer", widget: "text", hint: "Keep this. It's what makes it a parody." }
          - label: "Menu"
            name: "nav"
            widget: "list"
            summary: "{{fields.label}}"
            fields:
              - { label: "Label", name: "label", widget: "string" }
              - { label: "Link", name: "href", widget: "string" }
          - label: "Socials"
            name: "socials"
            widget: "list"
            summary: "{{fields.label}}"
            fields:
              - { label: "Network", name: "label", widget: "string" }
              - { label: "Handle", name: "handle", widget: "string" }
