# Website editor settings. Editors never need to touch this file.
backend:
  name: github
  repo: MILT-NRI/milt-india-web
  branch: main
  base_url: https://milt-editor-auth.milt-nri.workers.dev
  commit_messages:
    create: "Add {{collection}} “{{slug}}”"
    update: "Update {{collection}} “{{slug}}”"
    delete: "Delete {{collection}} “{{slug}}”"

site_url: https://miltindia.org
display_url: https://miltindia.org
logo_url: /brand/milt-icon-512.png
media_folder: public/uploads
public_folder: /uploads

collections:
  # ---------- EVENTS ----------
  - name: events
    label: "📅 Events"
    label_singular: "Event"
    description: "Add a new event, or change/delete an old one. Past events move to 'Past events' automatically."
    folder: src/content/events
    create: true
    slug: "{{year}}-{{month}}-{{slug}}"
    sortable_fields: [date, title]
    summary: "{{date | date('DD MMM YYYY')}} — {{title}}"
    fields:
      - { name: title, label: "Event name", widget: string }
      - { name: date, label: "Date (start)", widget: datetime, time_format: false, format: "YYYY-MM-DD" }
      - { name: end_date, label: "End date (only if more than one day)", widget: datetime, time_format: false, format: "YYYY-MM-DD", required: false }
      - { name: location, label: "Place", widget: string, required: false }
      - { name: summary, label: "Short description (1–2 lines)", widget: text }
      - { name: image, label: "Photo / poster", widget: image, required: false }
      - { name: register_link, label: "Registration link (Google Form etc.)", widget: string, required: false, hint: "Paste the full link starting with https://" }
      - { name: body, label: "Full details", widget: markdown, required: false }

  # ---------- GALLERY ----------
  - name: gallery
    label: "🖼️ Photo Albums"
    label_singular: "Album"
    description: "Create an album and upload photos."
    folder: src/content/gallery
    create: true
    slug: "{{year}}-{{slug}}"
    summary: "{{title}}"
    fields:
      - { name: title, label: "Album name", widget: string }
      - { name: date, label: "Date", widget: datetime, time_format: false, format: "YYYY-MM-DD" }
      - { name: cover, label: "Cover photo (optional)", widget: image, required: false }
      - name: photos
        label: "Photos"
        label_singular: "Photo"
        widget: list
        fields:
          - { name: image, label: "Photo", widget: image }
          - { name: caption, label: "Caption (optional)", widget: string, required: false }

  # ---------- PAPERS ----------
  - name: papers
    label: "📄 Technical Papers"
    label_singular: "Paper"
    folder: src/content/papers
    create: true
    slug: "{{slug}}"
    summary: "{{title}}"
    fields:
      - { name: title, label: "Title", widget: string }
      - { name: author, label: "Author", widget: string, required: false }
      - { name: date, label: "Date", widget: datetime, time_format: false, format: "YYYY-MM-DD" }
      - { name: summary, label: "Short summary", widget: text }
      - { name: pdf, label: "PDF file (optional)", widget: file, required: false }
      - { name: image, label: "Cover picture (optional)", widget: image, required: false }
      - { name: body, label: "Full text (optional)", widget: markdown, required: false }

  # ---------- ARTICLES ----------
  - name: articles
    label: "✍️ Articles & Stories"
    label_singular: "Article"
    description: "Articles, Aporesh stories and Sunday Satsang notes. The web address will be miltindia.org/<title>/"
    folder: src/content/articles
    create: true
    slug: "{{slug}}"
    sortable_fields: [date, title]
    summary: "{{date | date('DD MMM YYYY')}} — {{title}} ({{category}})"
    fields:
      - { name: title, label: "Title", widget: string }
      - { name: date, label: "Date", widget: datetime, time_format: false, format: "YYYY-MM-DD" }
      - { name: author, label: "Written by", widget: string, required: false }
      - { name: category, label: "Category", widget: select, options: ["Articles", "Aporesh Stories", "Sunday Satsang Notes", "News"], default: "Articles" }
      - { name: image, label: "Main picture", widget: image, required: false }
      - { name: summary, label: "Short summary (1–2 lines)", widget: text, required: false }
      - { name: body, label: "Article", widget: markdown }

  # ---------- PAGES ----------
  - name: pages
    label: "📃 Pages"
    label_singular: "Page"
    description: "All other pages (Snehalayas, Aporesh Acharya, BF23 pages…). The web address is miltindia.org/<file name>/. Pages in the same section are linked to each other at the bottom."
    folder: src/content/pages
    create: true
    slug: "{{slug}}"
    summary: "{{section}} → {{title}}"
    sortable_fields: [section, title]
    fields:
      - { name: title, label: "Page title", widget: string }
      - { name: description, label: "Short description (for Google)", widget: text, required: false }
      - { name: section, label: "Section", widget: select, options: ["About & Training", "Social Projects", "Nation Building (NRI)", "Members & Alumni", "BreakFree ’23 Convention", "Other"], default: "Other" }
      - { name: image, label: "Top picture (optional)", widget: image, required: false }
      - { name: order, label: "Position in section (1 = first)", widget: number, value_type: int, default: 10 }
      - { name: list_category, label: "Also list articles of this category below (optional)", widget: select, options: ["", "Articles", "Aporesh Stories", "Sunday Satsang Notes", "News"], required: false }
      - { name: body, label: "Page content", widget: markdown }

  # ---------- ACTIVITIES ----------
  - name: activities
    label: "🤝 Our Work"
    label_singular: "Activity"
    description: "Projects and activities shown on the home page."
    folder: src/content/activities
    create: true
    slug: "{{slug}}"
    summary: "{{order}}. {{title}}"
    sortable_fields: [order, title]
    fields:
      - { name: title, label: "Name", widget: string }
      - { name: summary, label: "Short description (1 line)", widget: text }
      - { name: image, label: "Photo", widget: image, required: false }
      - { name: order, label: "Position (1 = first)", widget: number, value_type: int, default: 10 }
      - { name: link, label: "Send visitors to another link instead (optional)", widget: string, required: false }
      - { name: body, label: "Full details", widget: markdown, required: false }

  # ---------- PAGES & SETTINGS ----------
  - name: site
    label: "⚙️ Home, About & Settings"
    files:
      - name: home
        label: "Home page"
        file: src/data/home.json
        fields:
          - { name: announcement, label: "Top announcement bar (leave empty to hide)", widget: string, required: false }
          - { name: hero_title, label: "Big heading", widget: string }
          - { name: hero_highlight, label: "Words in the heading to show in gold (optional)", widget: string, required: false }
          - { name: hero_text, label: "Text below heading", widget: text }
          - { name: hero_image, label: "Big background photo", widget: image, required: false }
          - { name: hero_button_text, label: "Main button text", widget: string }
          - { name: hero_button_link, label: "Main button link", widget: string }
          - { name: hero_button2_text, label: "Second button text (optional)", widget: string, required: false }
          - { name: hero_button2_link, label: "Second button link", widget: string, required: false }
          - name: stats
            label: "Number boxes"
            label_singular: "Number box"
            widget: list
            fields:
              - { name: number, label: "Number", widget: string }
              - { name: label, label: "Label", widget: string }
          - { name: about_title, label: "'Who we are' heading", widget: string }
          - { name: about_text, label: "'Who we are' text", widget: text }
          - { name: about_image, label: "'Who we are' big photo", widget: image, required: false }
          - { name: about_image2, label: "'Who we are' small photo", widget: image, required: false }
          - { name: intro_title, label: "'Our work' small label", widget: string }
          - { name: intro_text, label: "'Our work' text", widget: text }
          - { name: quote_text, label: "Quote", widget: text, required: false }
          - { name: quote_author, label: "Quote by", widget: string, required: false }
          - { name: quote_role, label: "Quote — line under the name", widget: string, required: false }
          - { name: quote_image, label: "Quote photo", widget: image, required: false }
          - { name: cta_title, label: "Bottom red box — heading", widget: string }
          - { name: cta_text, label: "Bottom red box — text", widget: string }

      - name: about
        label: "About page"
        file: src/data/about.md
        fields:
          - { name: title, label: "Heading", widget: string }
          - { name: subtitle, label: "Subheading", widget: string, required: false }
          - { name: image, label: "Photo", widget: image, required: false }
          - { name: body, label: "Page text", widget: markdown }

      - name: settings
        label: "Contact details, menu & logo"
        file: src/data/settings.json
        fields:
          - { name: site_name, label: "Short name", widget: string }
          - { name: full_name, label: "Full organisation name", widget: string }
          - { name: tagline, label: "Tagline", widget: string }
          - { name: logo, label: "Logo picture (leave empty to use the official MILT logo)", widget: image, required: false }
          - { name: header_button_text, label: "Red button in top bar — text (leave empty to hide)", widget: string, required: false }
          - { name: header_button_link, label: "Red button in top bar — link", widget: string, required: false }
          - { name: email, label: "Email", widget: string, required: false }
          - { name: phone, label: "Phone", widget: string, required: false }
          - { name: whatsapp, label: "WhatsApp number (with 91)", widget: string, required: false }
          - { name: address, label: "Address", widget: text, required: false }
          - { name: footer_note, label: "Footer text", widget: text }
          - name: menu
            label: "Top menu"
            label_singular: "Menu item"
            widget: list
            fields:
              - { name: label, label: "Text", widget: string }
              - { name: link, label: "Link", widget: string }
              - name: children
                label: "Drop-down items (optional)"
                label_singular: "Drop-down item"
                widget: list
                required: false
                fields:
                  - { name: label, label: "Text", widget: string }
                  - { name: link, label: "Link", widget: string }
          - name: social
            label: "Social media"
            widget: list
            fields:
              - { name: name, label: "Name", widget: string }
              - { name: link, label: "Link", widget: string, required: false }
