# Decap CMS — edits JSON files in the GitHub repo; Cloudflare rebuilds the site on every save.
backend:
  name: github
  repo: rhiannonlouise/rhiannonwelton-site   # ← change to your repo (owner/name)
  branch: main
  base_url: https://rhiannonwelton.com             # where functions/api/auth.js lives
  auth_endpoint: api/auth                          # no leading slash

site_url: https://rhiannonwelton.com
display_url: https://rhiannonwelton.com
publish_mode: simple
locale: en
media_folder: static/assets/img/uploads
public_folder: /assets/img/uploads

collections:
  - name: halls
    label: Halls
    label_singular: Hall
    description: One entry per study or essay. Each becomes a page at rhiannonwelton.com/<slug>/.
    folder: content/halls
    extension: json
    format: json
    create: true
    identifier_field: slug
    slug: "{{slug}}"
    summary: "{{order}}. {{title}} — {{status}}"
    sortable_fields: [order, title, status]
    fields:
      - { label: Web address (slug), name: slug, widget: string, pattern: ["^[a-z0-9]+(-[a-z0-9]+)*$", "Lowercase letters, numbers and hyphens only"], hint: "Becomes rhiannonwelton.com/<slug>/ — changing it breaks old links." }
      - { label: Order in the menu and on the path, name: order, widget: number, value_type: int, min: 1 }
      - label: Status
        name: status
        widget: select
        options:
          - { label: Still lives on the old Netlify site, value: coming }
          - { label: Published here, value: published }
        default: coming
      - label: Colour theme
        name: theme
        widget: select
        options:
          - { label: Dark chocolate, value: cocoa }
          - { label: Midnight (starry), value: midnight }
          - { label: Creamy milk, value: milk }
          - { label: Sacred year (colour shifts from purple to gold as you read), value: sacred }
        default: cocoa
      - { label: Page colours for the Sacred-year theme (one per section, top to bottom), name: tones, widget: list, required: false, field: { label: Colour, name: color, widget: color } }
      - { label: Menu label (short), name: menu_label, widget: string }
      - { label: Kind (e.g. An Essay), name: kind, widget: string }
      - { label: Title, name: title, widget: string }
      - { label: Tagline, name: tagline, widget: text }
      - { label: Line under the tagline (byline or subtitle), name: byline, widget: string, required: false }
      - { label: Summary (shown under "What's inside"), name: summary, widget: text }
      - { label: Invitation line, name: invitation, widget: string, required: false }
      - { label: Button label, name: cta_label, widget: string }
      - { label: Old site address, name: legacy_url, widget: string, required: false, hint: "Used while Status is 'Still lives on the old Netlify site'." }
      - { label: Search-engine description, name: seo_description, widget: text, required: false }
      - label: Introduction
        name: intro
        widget: markdown
        required: false
        editor_components: []
        buttons: [bold, italic, link, quote, bulleted-list, numbered-list]
      - label: Sections (each one becomes an expandable section)
        name: chapters
        widget: list
        required: false
        summary: "{{fields.title}}"
        fields:
          - { label: Small label above the title (e.g. Part I), name: label, widget: string, required: false }
          - { label: Section title, name: title, widget: string }
          - { label: Short teaser under the title, name: teaser, widget: text, required: false }
          - label: Cards inside this section (small expandable items such as verses)
            name: cards
            widget: list
            required: false
            summary: "{{fields.title}}"
            fields:
              - { label: Card title, name: title, widget: string }
              - { label: Card teaser, name: teaser, widget: string, required: false }
              - { label: Card text, name: body, widget: markdown, editor_components: [], buttons: [bold, italic, link, quote] }
          - label: Section text
            name: body
            widget: markdown
            editor_components: []
            buttons: [bold, italic, link, heading-one, heading-two, quote, bulleted-list, numbered-list, code-block]
            hint: "Heading 1 = larger sub-heading, Heading 2 = smaller. Raw HTML is not allowed."
      - label: Closing words
        name: closing
        widget: markdown
        required: false
        editor_components: []
        buttons: [bold, italic, link, quote]
      - label: Small print (credits, copyright notices)
        name: notice
        widget: markdown
        required: false
        editor_components: []
        buttons: [bold, italic, link]

  - name: pages
    label: Site settings and home page
    files:
      - label: Site settings
        name: site
        file: content/site.json
        format: json
        fields:
          - { label: Site name, name: name, widget: string }
          - { label: Site address, name: url, widget: string }
          - { label: Home page title, name: title, widget: string }
          - { label: Site description, name: description, widget: text }
          - { label: Footer text, name: copyright, widget: string }
          - { label: AuraCanvas menu label, name: aura_label, widget: string }
          - { label: AuraCanvas address, name: aura_url, widget: string }
      - label: Home page
        name: home
        file: content/home.json
        format: json
        fields:
          - label: Opening
            name: hero
            widget: object
            fields:
              - { label: First line, name: line1, widget: string }
              - { label: Second line, name: line2, widget: string }
              - { label: Welcome text, name: lede, widget: text }
              - { label: Button label, name: cta_label, widget: string }
          - label: The curious cat
            name: curiosity
            widget: object
            fields:
              - { label: Heading, name: title, widget: string }
              - { label: Text, name: body, widget: markdown, editor_components: [], buttons: [bold, italic, link] }
              - { label: Scripture text, name: scripture_text, widget: string }
              - { label: Scripture reference, name: scripture_ref, widget: string }
              - { label: Scripture link, name: scripture_url, widget: string }
              - { label: Caption under the cookie cat, name: caption_curious, widget: string }
              - { label: Caption under the wise cat, name: caption_wise, widget: string }
          - label: The halls
            name: halls
            widget: object
            fields:
              - { label: Heading, name: title, widget: string }
              - { label: Introduction, name: intro, widget: text }
          - label: The stair (AuraCanvas)
            name: beyond
            widget: object
            fields:
              - { label: Heading, name: title, widget: string }
              - { label: Text, name: body, widget: text }
              - { label: Button label, name: cta_label, widget: string }
          - label: Closing
            name: closing
            widget: object
            fields:
              - { label: Heading, name: title, widget: string }
              - { label: Text, name: body, widget: text }
