# Content dashboard configuration (Sveltia CMS).
#
# LOCAL editing (works right now, no login): open http://localhost:4321/admin
# in Chrome, click "Work with Local Repository", and pick the Portfolio folder.
# Saves write straight to these files — commit + push publishes them.
#
# REMOTE editing (after the site is deployed): requires a one-time GitHub
# OAuth setup — see docs/DASHBOARD.md.

backend:
  name: github
  repo: yoelbender-lang/portfolio
  branch: v2-experience

site_url: https://yoelbender.com
display_url: https://yoelbender.com

# Uploads land in src/assets/projects so Astro optimizes them at build time.
# The stored "/src/assets/projects/…" paths are mapped to Astro-relative paths
# by the schema in src/content.config.ts (cmsImage) — keep the two in sync.
media_folder: src/assets/projects
public_folder: /src/assets/projects

collections:
  - name: projects
    label: Work / Projects
    label_singular: Project
    folder: src/content/projects
    extension: md
    format: yaml-frontmatter
    create: true
    delete: true
    slug: '{{slug}}'
    summary: '{{title}} — {{year}}'
    sortable_fields: [title, year, order]
    fields:
      - { name: title, label: Title, widget: string }
      - name: summary
        label: Summary
        widget: text
        hint: Card blurb + meta description. Max 280 characters.
      - name: category
        label: Category
        widget: select
        options: [art, design, professional]
        default: professional
      - { name: tags, label: Tags, widget: list, default: [], required: false }
      - { name: year, label: Year, widget: number, value_type: int }
      - { name: role, label: Your role, widget: string, required: false }
      - { name: client, label: Client, widget: string, required: false }
      - { name: heroImage, label: Hero image, widget: image }
      - { name: heroAlt, label: Hero image alt text, widget: string }
      - name: gallery
        label: Gallery
        widget: list
        required: false
        default: []
        fields:
          - { name: src, label: Image, widget: image }
          - { name: alt, label: Alt text, widget: string }
          - { name: caption, label: Caption, widget: string, required: false }
      - name: links
        label: Links
        widget: list
        required: false
        default: []
        fields:
          - { name: label, label: Label, widget: string }
          - { name: url, label: URL, widget: string }
      - name: featured
        label: Featured
        widget: boolean
        default: false
        hint: Featured projects sort to the top of the Work index.
      - name: order
        label: Sort order
        widget: number
        value_type: int
        default: 0
        hint: Lower numbers appear first.
      - name: draft
        label: Draft
        widget: boolean
        default: false
        hint: Drafts never appear on the live site.
      - name: body
        label: Case study text
        widget: markdown
        hint: The write-up shown on the project page.

  - name: positions
    label: CV — Positions
    label_singular: Position
    folder: src/content/positions
    extension: yaml
    format: yaml
    create: true
    delete: true
    summary: '{{org}} — {{title}}'
    sortable_fields: [order, org]
    fields:
      - { name: title, label: Job title, widget: string }
      - { name: org, label: Organization, widget: string }
      - name: period
        label: Period
        widget: string
        hint: 'Free text, e.g. "2023 — Present" or "2014–2020".'
      - { name: location, label: Location / context line, widget: string, required: false }
      - name: current
        label: Current position
        widget: boolean
        default: false
        hint: The current position gets the highlighted card at the top.
      - { name: summary, label: Summary, widget: text }
      - name: highlights
        label: Highlights
        widget: list
        required: false
        default: []
        hint: Short bullets — shown only on the current position.
      - { name: order, label: Sort order, widget: number, value_type: int, default: 0 }
      - name: draft
        label: Draft
        widget: boolean
        default: false
        hint: Drafts never appear on the live site.

  - name: bio
    label: Bio
    files:
      - name: bio
        label: Bio
        file: src/content/bio/bio.yaml
        fields:
          - name: eyebrow
            label: Eyebrow
            widget: string
            default: The Person
            required: false
          - { name: heading, label: Heading, widget: string }
          - name: short
            label: Short intro
            widget: text
            hint: The paragraph everyone sees. Keep it tight.
          - name: more
            label: More paragraphs
            widget: list
            required: false
            hint: Revealed by the More button — the longer read.

  - name: cv
    label: CV — Skills
    files:
      - name: skills
        label: Skills & disciplines
        file: src/content/cv/skills.yaml
        fields:
          - name: groups
            label: Skill groups
            widget: list
            fields:
              - { name: name, label: Group name, widget: string }
              - { name: blurb, label: One-line intro, widget: string, required: false }
              - { name: items, label: Items, widget: list }
