# Decap CMS — editable content for Precise Aerospace & Defense.
# Admin UI: /admin (src/pages/admin.astro). Config is this file.
#
# Local editing: run `npx decap-server` alongside `npm run dev`, then open
# http://localhost:4321/admin (local_backend talks to the proxy on :8081).
#
# Production auth: GitHub OAuth via workers/decap-auth (auth.preciseaerodefense.com).
# Local editing: keep local_backend true and run `npx decap-server` with `npm run dev`.

backend:
  name: github
  repo: ATL-Partners/precise-website
  branch: main
  base_url: https://auth.preciseaerodefense.com
  auth_endpoint: auth

# Local editing uses the decap-server proxy (npx decap-server) instead of GitHub.
# On the deployed site this is ignored; Decap uses the GitHub backend above.
local_backend: true

site_url: https://preciseaerodefense.com
display_url: https://preciseaerodefense.com
logo_url: /favicon.svg

media_folder: public/uploads
public_folder: /uploads

slug:
  encoding: ascii
  clean_accents: true

collections:
  - name: pages
    label: Landing Page
    files:
      - name: home
        label: Home
        file: src/content/pages/home.yml
        fields:
          - label: Hero
            name: hero
            widget: object
            fields:
              - { label: Tagline, name: tagline, widget: string }
              - { label: Heading lines, name: heading, widget: list, allow_add: true, field: { label: Line, name: line, widget: string } }
              - { label: Supporting sentence, name: lede, widget: text }
              - label: Primary CTA
                name: primaryCta
                widget: object
                fields:
                  - { label: Label, name: label, widget: string }
                  - { label: Link, name: href, widget: string }
              - label: Secondary CTA
                name: secondaryCta
                widget: object
                fields:
                  - { label: Label, name: label, widget: string }
                  - { label: Link, name: href, widget: string }

          - label: About
            name: about
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Heading lines, name: heading, widget: list, field: { label: Line, name: line, widget: string } }
              - { label: Paragraphs, name: paragraphs, widget: list, field: { label: Paragraph, name: paragraph, widget: text } }
              - { label: Button label, name: ctaLabel, widget: string }
              - { label: Button link, name: ctaHref, widget: string }
              - { label: Image alt text, name: imageAlt, widget: string }

          - label: Capabilities section
            name: capabilities
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Heading, name: heading, widget: string }
              - { label: Supporting sentence, name: lede, widget: text }

          - label: Markets section
            name: markets
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Heading, name: heading, widget: string }
              - { label: Supporting sentence, name: lede, widget: text }

          - label: Why Precise
            name: whyPrecise
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Heading lines, name: heading, widget: list, field: { label: Line, name: line, widget: string } }

          - label: Companies section
            name: companies
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Heading, name: heading, widget: string }
              - { label: Supporting sentence, name: lede, widget: text }

          - label: Sponsor section
            name: sponsor
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Heading, name: heading, widget: string }
              - { label: Description, name: description, widget: text }
              - { label: Footer attribution line, name: footerLine, widget: string }

          - label: Contact
            name: contact
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Heading lines, name: heading, widget: list, field: { label: Line, name: line, widget: string } }
              - { label: Supporting sentence, name: lede, widget: text }
              - { label: Button label, name: ctaLabel, widget: string }
              - { label: Tagline, name: tagline, widget: string }

          - label: Footer
            name: footer
            widget: object
            fields:
              - { label: Description, name: description, widget: text }
              - { label: Tagline, name: tagline, widget: string }

  - name: platform
    label: Platform Facts
    files:
      - name: platform
        label: Proof points, stats & differentiators
        file: src/content/platform/index.yml
        fields:
          - label: Hero proof points
            name: proofPoints
            widget: list
            summary: '{{fields.label}}'
            fields:
              - { label: Label, name: label, widget: string }
              - label: Icon
                name: icon
                widget: select
                options:
                  - settings-28
                  - target
                  - layers
                  - shield-28
                  - settings-32
                  - wrench
                  - zap
                  - git-merge
                  - thermometer
                  - check-circle
                  - navigation
                  - shield-32
                  - cpu
          - label: About stats
            name: stats
            widget: list
            summary: '{{fields.value}} — {{fields.label}}'
            fields:
              - { label: Value, name: value, widget: string }
              - { label: Label, name: label, widget: string }
          - label: Why Precise differentiators
            name: differentiators
            widget: list
            summary: '{{fields.title}}'
            fields:
              - { label: Title, name: title, widget: string }
              - { label: Description, name: description, widget: text }

  - name: capabilities
    label: Capabilities
    label_singular: Capability group
    folder: src/content/capabilities
    extension: yml
    create: true
    delete: true
    slug: '{{slug}}'
    summary: '{{title}}'
    sortable_fields: ['order', 'title']
    fields:
      - { label: Title, name: title, widget: string }
      - { label: Description, name: description, widget: text }
      - { label: Processes, name: items, widget: list, allow_add: true, field: { label: Process, name: item, widget: string } }
      - label: Icon
        name: icon
        widget: select
        options:
          - settings-32
          - wrench
          - zap
          - git-merge
          - thermometer
          - check-circle
          - settings-28
          - target
          - layers
          - shield-28
          - navigation
          - shield-32
          - cpu
      - { label: Display order, name: order, widget: number, value_type: int, min: 0 }

  - name: companies
    label: Companies
    label_singular: Company
    folder: src/content/companies
    extension: yml
    create: true
    delete: true
    slug: '{{slug}}'
    summary: '{{name}}'
    sortable_fields: ['order', 'name']
    fields:
      - { label: Name, name: name, widget: string }
      - { label: Tagline, name: tagline, widget: string }
      - { label: Description, name: description, widget: text }
      - { label: Website, name: website, widget: string }
      - { label: Logo, name: logo, widget: image, required: false }
      - { label: Location, name: location, widget: string, required: false }
      - { label: Founded year, name: founded, widget: number, value_type: int, required: false }
      - { label: Highlights, name: highlights, widget: list, required: false, field: { label: Highlight, name: highlight, widget: string } }
      - { label: Display order, name: order, widget: number, value_type: int, min: 0 }

  - name: news
    label: News
    label_singular: Article
    folder: src/content/news
    create: true
    delete: true
    slug: '{{slug}}'
    extension: md
    format: frontmatter
    summary: '{{title}}'
    sortable_fields: ['pubDate', 'title']
    fields:
      - { label: Title, name: title, widget: string }
      - { label: Summary, name: summary, widget: text }
      - { label: Publish date, name: pubDate, widget: datetime, date_format: YYYY-MM-DD, time_format: false }
      - { label: Draft, name: draft, widget: boolean, default: false }
      - {
          label: Featured on homepage,
          name: featured,
          widget: boolean,
          default: false,
          hint: 'Pin this article to the landing page. If more than one is featured, the newest is shown.',
        }
      - { label: Image, name: image, widget: image, required: false }
      - { label: Image alt text, name: imageAlt, widget: string, required: false }
      - { label: Body, name: body, widget: markdown }
