backend:
  name: git-gateway
  branch: master

media_folder: public/images/uploads
public_folder: /images/uploads

collections:
  - name: "case-studies"
    label: "Case Studies"
    label_singular: "Case Study"
    folder: "src/content/case-studies"
    create: true
    slug: "{{slug}}"
    sortable_fields: ["pubDate", "title", "client"]
    summary: "{{client}} — {{title}}"
    editor:
      size: half
    fields:
      # ── Core info ──
      - label: "Title"
        name: "title"
        widget: "string"
        hint: "SEO-friendly headline for the case study"

      - label: "Client"
        name: "client"
        widget: "string"

      - label: "Publish Date"
        name: "pubDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"

      - label: "Sort Order"
        name: "sortOrder"
        widget: "number"
        default: 999
        value_type: "int"
        hint: "Lower numbers appear first (default 999)"
        required: false

      - label: "Summary"
        name: "summary"
        widget: "text"
        hint: "Short description used in cards and SEO meta"

      # ── Images ──
      - label: "Client Logo"
        name: "clientLogo"
        widget: "image"
        required: false
        hint: "SVG or PNG logo displayed on the case study card"

      - label: "Cover Image"
        name: "coverImage"
        widget: "image"
        required: false
        hint: "Hero image shown at the top of the case study"

      # ── Taxonomy ──
      - label: "Tags"
        name: "tags"
        widget: "list"
        required: false
        collapsed: true
        hint: "Comma-separated or add individually"
        summary: "{{fields.tag}}"

      # ── Key Metrics ──
      - label: "Key Metrics"
        name: "metrics"
        widget: "list"
        required: false
        collapsed: true
        minimize_collapsed: true
        summary: "{{fields.value}} — {{fields.label}}"
        hint: "Headline stats shown at the top of the case study (e.g. '63%' / 'Increase in changing room entries')"
        fields:
          - label: "Value"
            name: "value"
            widget: "string"
            hint: "e.g. 5X, 63%, 10%"
          - label: "Label"
            name: "label"
            widget: "string"
            hint: "e.g. Increase in changing room entries"

      # ── Body ──
      - label: "Body"
        name: "body"
        widget: "markdown"
        hint: "Main content — use ## for section headings"

      # ── Testimonial ──
      - label: "Testimonial"
        name: "testimonial"
        widget: "object"
        required: false
        collapsed: true
        hint: "Optional client quote displayed as a highlight block"
        fields:
          - label: "Headliner"
            name: "headliner"
            widget: "string"
            hint: "Short pull-quote or headline"
          - label: "Quote"
            name: "quote"
            widget: "text"
          - label: "Name"
            name: "name"
            widget: "string"
          - label: "Role"
            name: "role"
            widget: "string"
          - label: "Photo"
            name: "photo"
            widget: "image"
            required: false

  - name: "press"
    label: "Press"
    label_singular: "Press Article"
    folder: "src/content/press"
    create: true
    slug: "{{slug}}"
    sortable_fields: ["pubDate", "title", "publication"]
    summary: "{{publication}} — {{title}}"
    editor:
      size: half
    fields:
      - label: "Title"
        name: "title"
        widget: "string"
        hint: "Headline of the article"

      - label: "Publication"
        name: "publication"
        widget: "string"
        hint: "Name of the publication (e.g. TechCrunch, Forbes)"

      - label: "Publish Date"
        name: "pubDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"

      - label: "External URL"
        name: "externalUrl"
        widget: "string"
        hint: "Full URL to the original article"

      - label: "Cover Image"
        name: "coverImage"
        widget: "image"
        required: false
        hint: "Cover image for the press card"

      - label: "Contain Image"
        name: "containImage"
        widget: "boolean"
        default: false
        required: false
        hint: "Show the full image (contained) instead of cropping to fill"

      - label: "Summary"
        name: "summary"
        widget: "text"
        hint: "Short description of the article"
  - name: "api-docs-getting-started"
    label: "API Docs — Getting Started"
    label_singular: "Page"
    folder: "src/content/api-docs"
    create: true
    filter: { field: category, value: "Getting Started" }
    slug: "{{slug}}"
    sortable_fields: ["order", "title"]
    summary: "{{order}} · {{title}}"
    editor:
      size: half
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Summary", name: "summary", widget: "text", required: false }
      - label: "Category"
        name: "category"
        widget: "select"
        options: ["Getting Started", "Core API", "Metrics API"]
      - label: "Group"
        name: "group"
        widget: "string"
        required: false
        hint: "Subgroup within category, e.g. Traffic, Lines, Campaigns. Endpoints in the same group share a collapsible sidebar section."
      - { label: "Order", name: "order", widget: "number", value_type: "int" }
      - label: "API Type"
        name: "apiType"
        widget: "select"
        required: false
        options: ["REST", "WebSocket"]
      - label: "Method"
        name: "method"
        widget: "select"
        required: false
        options: ["GET", "POST", "PUT", "DELETE", "WS"]
      - { label: "Path", name: "path", widget: "string", required: false }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "api-docs-core"
    label: "API Docs — Core API"
    label_singular: "Page"
    folder: "src/content/api-docs/core"
    create: true
    nested:
      depth: 2
    slug: "{{slug}}"
    sortable_fields: ["order", "group", "title"]
    summary: "{{order}} · {{group}} · {{title}}"
    view_groups:
      - { label: "Group", field: group }
    editor:
      size: half
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Summary", name: "summary", widget: "text", required: false }
      - label: "Category"
        name: "category"
        widget: "select"
        options: ["Getting Started", "Core API", "Metrics API"]
      - label: "Group"
        name: "group"
        widget: "string"
        required: false
        hint: "Subgroup within category, e.g. Status, Campaigns, Locations. Endpoints in the same group share a collapsible sidebar section."
      - { label: "Order", name: "order", widget: "number", value_type: "int" }
      - label: "API Type"
        name: "apiType"
        widget: "select"
        required: false
        options: ["REST", "WebSocket"]
      - label: "Method"
        name: "method"
        widget: "select"
        required: false
        options: ["GET", "POST", "PUT", "DELETE", "WS"]
      - { label: "Path", name: "path", widget: "string", required: false }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "api-docs-metrics"
    label: "API Docs — Metrics API"
    label_singular: "Page"
    folder: "src/content/api-docs/metrics"
    create: true
    nested:
      depth: 2
    slug: "{{slug}}"
    sortable_fields: ["order", "group", "title"]
    summary: "{{order}} · {{group}} · {{title}}"
    view_groups:
      - { label: "Group", field: group }
    editor:
      size: half
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Summary", name: "summary", widget: "text", required: false }
      - label: "Category"
        name: "category"
        widget: "select"
        options: ["Getting Started", "Core API", "Metrics API"]
      - label: "Group"
        name: "group"
        widget: "string"
        required: false
        hint: "Subgroup within category, e.g. Traffic, Lines, Areas, Sales. Endpoints in the same group share a collapsible sidebar section."
      - { label: "Order", name: "order", widget: "number", value_type: "int" }
      - label: "API Type"
        name: "apiType"
        widget: "select"
        required: false
        options: ["REST", "WebSocket"]
      - label: "Method"
        name: "method"
        widget: "select"
        required: false
        options: ["GET", "POST", "PUT", "DELETE", "WS"]
      - { label: "Path", name: "path", widget: "string", required: false }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "blog"
    label: "Blog"
    label_singular: "Blog Post"
    folder: "src/content/blog"
    create: true
    slug: "{{slug}}"
    sortable_fields: ["pubDate", "title"]
    summary: "{{title}}"
    editor:
      size: half
    fields:
      - label: "Title"
        name: "title"
        widget: "string"
        hint: "Headline for the blog post"

      - label: "Publish Date"
        name: "pubDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"

      - label: "Cover Image"
        name: "coverImage"
        widget: "image"
        required: false
        hint: "Hero image shown at the top of the blog post"

      - label: "Summary"
        name: "summary"
        widget: "text"
        hint: "Short description used in cards and SEO meta"

      - label: "Tags"
        name: "tags"
        widget: "list"
        required: false
        collapsed: true
        hint: "Comma-separated or add individually"

      - label: "Body"
        name: "body"
        widget: "markdown"
        hint: "Main content — use ## for section headings"

  - name: "decks"
    label: "Pitch Decks"
    label_singular: "Pitch Deck"
    folder: "src/content/decks"
    create: true
    slug: "{{slug}}"
    sortable_fields: ["date", "title", "prospect"]
    summary: "{{prospect}} — {{title}}"
    editor:
      size: half
    fields:
      - label: "Title"
        name: "title"
        widget: "string"
        hint: "Internal name for the deck"

      - label: "Date"
        name: "date"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false

      - label: "Slides"
        name: "slides"
        widget: "list"
        collapsed: false
        summary: "{{fields.type}} — {{fields.title}}"
        hint: "Add slides in order. Each slide has a type that determines its layout."
        types:
          - label: "Cover"
            name: "cover"
            widget: "object"
            summary: "Cover: {{fields.title}}"
            fields:
              - { label: "Type", name: "type", widget: "hidden", default: "cover" }
              - { label: "Title", name: "title", widget: "string", hint: "e.g. Retail Discovery Deck" }
              - { label: "Tagline", name: "tagline", widget: "string" }
              - { label: "Logo", name: "logo", widget: "image", required: false, hint: "Custom logo (defaults to Aura Vision)" }
              - { label: "Background", name: "background", widget: "select", required: false, default: "none", options: ["none", "top", "bottom", "bl", "br"], hint: "Background image for the slide" }

          - label: "Tech"
            name: "tech"
            widget: "object"
            summary: "Tech: {{fields.title}}"
            fields:
              - { label: "Type", name: "type", widget: "hidden", default: "tech" }
              - { label: "Category", name: "category", widget: "string", required: false, default: "Technology", hint: "Label shown above the title (e.g. Technology)" }
              - { label: "Title", name: "title", widget: "string", required: false }
              - { label: "Subtitle", name: "subtitle", widget: "string", required: false }
              - { label: "Callout", name: "callout", widget: "markdown", required: false, hint: "Use raw mode to write HTML (e.g. <span style='color:#4ade80'>✓</span>)" }
              - { label: "Video", name: "video", widget: "file", required: false }
              - { label: "Background", name: "background", widget: "select", required: false, default: "none", options: ["none", "top", "bottom", "bl", "br"], hint: "Background image for the slide" }

          - label: "Table"
            name: "table"
            widget: "object"
            summary: "Table: {{fields.title}}"
            fields:
              - { label: "Type", name: "type", widget: "hidden", default: "table" }
              - { label: "Category", name: "category", widget: "string", required: false, hint: "Label shown above the title" }
              - { label: "Category Background", name: "categoryBg", widget: "select", required: false, default: "none", options: ["none", "cyan", "fuchsia", "purple", "blue", "red", "orange"], hint: "Background colour for the category label" }
              - { label: "Title", name: "title", widget: "string", required: false }
              - { label: "Background", name: "background", widget: "select", required: false, default: "none", options: ["none", "top", "bottom", "bl", "br"], hint: "Background image for the slide" }
              - { label: "Subtitle", name: "subtitle", widget: "string", required: false }
              - { label: "Layout", name: "layout", widget: "select", default: "grid", options: ["grid", "table-striped", "table"], hint: "grid = spaced cards, table-striped = compact rows with alternating backgrounds, table = compact rows no background" }
              - { label: "Column Widths", name: "colWidths", widget: "list", required: false, field: { label: "Width", name: "width", widget: "number", value_type: "int" }, hint: "Proportional column widths (e.g. 1, 1, 1 for equal or 28, 40, 23, 12 for weighted). Defaults to 3 equal columns." }
              - label: "Rows"
                name: "rows"
                widget: "list"
                label_singular: "Row"
                summary: "Row {{index}}"
                fields:
                  - label: "Cells"
                    name: "cells"
                    widget: "list"
                    label_singular: "Cell"
                    summary: "Cell {{index}}"
                    fields:
                      - label: "Blocks"
                        name: "blocks"
                        widget: "list"
                        label_singular: "Block"
                        summary: "{{fields.type}}: {{fields.text}}"
                        types:
                          - label: "Text"
                            name: "text"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "text" }
                              - { label: "Text", name: "text", widget: "markdown", hint: "Supports HTML — use raw mode for inline styles" }
                              - { label: "Size", name: "size", widget: "select", default: "p-md", options: ["h1", "h2", "h3", "h4", "h5", "h6", "p-lg", "p-md", "p-sm", "p-xs"], hint: "Text size preset" }
                              - { label: "Background", name: "bg", widget: "select", required: false, default: "none", options: ["none", "cyan", "fuchsia", "purple", "blue", "red", "orange"], hint: "Tinted background behind this text block" }
                          - label: "Image"
                            name: "image"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "image" }
                              - { label: "Image", name: "src", widget: "image" }
                              - { label: "Alt Text", name: "alt", widget: "string", required: false }
                          - label: "Heatmap"
                            name: "heatmap"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "heatmap" }
                          - label: "Chat"
                            name: "chat"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "chat" }
                          - label: "Device"
                            name: "device"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "device" }
                          - label: "Snapshot"
                            name: "snapshot"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "snapshot" }
                              - { label: "Image", name: "src", widget: "image" }
                              - { label: "Camera Overlay", name: "camera", widget: "image", required: false, hint: "Small image overlaid top-left" }
                          - label: "Inline Table"
                            name: "inlinetable"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "inlinetable" }
                              - label: "Columns"
                                name: "columns"
                                widget: "list"
                                label_singular: "Column"
                                summary: "{{fields.label}}: {{fields.header}}"
                                fields:
                                  - { label: "Label", name: "label", widget: "string", hint: "Bottom label (e.g. 3 months)" }
                                  - { label: "Header", name: "header", widget: "string", hint: "Top cell text (e.g. A/B testing)" }
                                  - { label: "Level", name: "level", widget: "number", value_type: "int", min: 1, hint: "Height of the stacked column (1 = shortest)" }
                          - label: "Logos"
                            name: "logos"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "logos" }
                              - { label: "Fit", name: "fit", widget: "select", default: "fill", options: ["fill", "fixed"], required: false, hint: "fill = scale to container width, fixed = fixed height left-aligned" }
                              - label: "Items"
                                name: "items"
                                widget: "list"
                                label_singular: "Logo"
                                summary: "{{fields.alt}}"
                                fields:
                                  - { label: "Image", name: "src", widget: "image" }
                                  - { label: "Alt Text", name: "alt", widget: "string", required: false }
                          - label: "Testimonial"
                            name: "testimonial"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "testimonial" }
                              - { label: "Headliner", name: "headliner", widget: "string", hint: "Bold italic quote headline" }
                              - { label: "Quote", name: "quote", widget: "text", hint: "Supporting quote text" }
                              - { label: "Size", name: "size", widget: "select", required: false, default: "lg", options: ["sm", "md", "lg"], hint: "Font size preset (sm = compact, md = medium, lg = large)" }
                          - label: "Metrics"
                            name: "metrics"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "metrics" }
                              - label: "Items"
                                name: "items"
                                widget: "select"
                                multiple: true
                                options:
                                  - { label: "Footfall", value: "footfall" }
                                  - { label: "Staffing", value: "staffing" }
                                  - { label: "Queues", value: "queues" }
                                  - { label: "Demographics", value: "demographics" }
                                  - { label: "Passers-by", value: "passers-by" }
                                  - { label: "Capture", value: "capture" }
                                  - { label: "Dwell", value: "dwell" }
                                  - { label: "Impressions", value: "impressions" }
                                  - { label: "Heatmaps", value: "heatmaps" }
                                  - { label: "Conversion", value: "conversion" }
                                hint: "Select which metric icons to display"
                          - label: "Profile"
                            name: "profile"
                            widget: "object"
                            fields:
                              - { label: "Type", name: "type", widget: "hidden", default: "profile" }
                              - { label: "Name", name: "name", widget: "string" }
                              - { label: "Role", name: "role", widget: "string", hint: "Use \\n for line breaks" }
                              - { label: "Photo", name: "photo", widget: "image", required: false }
                              - { label: "Logo", name: "logo", widget: "image", required: false }
                              - { label: "Company", name: "company", widget: "string", required: false }
                      - label: "Cell Options"
                        name: "options"
                        widget: "object"
                        required: false
                        collapsed: true
                        fields:
                          - { label: "Background", name: "background", widget: "select", required: false, default: "none", options: ["none", "cyan", "fuchsia", "purple", "blue", "red", "orange", "white", "white-transparent"], hint: "Adds a tinted background with padding and rounded corners" }
                          - { label: "Glow Outline", name: "glow", widget: "select", required: false, default: "none", options: ["none", "cyan", "fuchsia", "purple", "blue", "red", "orange"], hint: "Adds a coloured outline with glow effect" }
                          - { label: "Vertical Align", name: "valign", widget: "select", required: false, default: "top", options: ["top", "center"], hint: "Vertically align cell contents — center will make background hug the content" }

  # ── Knowledge field list (anchor reused by every section collection) ──
  # Each per-section collection below uses the same fields with three per-section overrides:
  #  · `section` default — pinned to the collection's section value
  #  · `glossary` boolean — true for glossary terms, false (default) otherwise
  #  · the relation widget's `hint` for the Category field
  #
  # Voice & GEO rules for editors (also written in docs/voice.md):
  #  · First sentence = direct answer. LLMs cite leading sentences.
  #  · One topic per article. Title is the question; body answers it.
  #  · APU (Analytics Processing Unit) on first mention, never "Micro PC".
  #  · Strip "usually / typically / may". Use specifics.
  #  · No infrastructure detail in Trust (no AWS / EEA / cipher names).
  #  · No pricing — link to contact instead.

  - name: "knowledge-getting-started"
    label: "Knowledge — Getting Started"
    label_singular: "Article"
    folder: "src/content/knowledge"
    create: true
    filter: { field: section, value: "Getting Started" }
    path: "getting-started/{{slug}}"
    slug: "{{slug}}"
    sortable_fields: ["order", "title"]
    summary: "{{order}} · {{title}}"
    editor:
      size: half
    fields:
      - { label: "Title", name: "title", widget: "string", hint: "Specific question or noun phrase. SEO + GEO title — make it a real query a user would type." }
      - { label: "Summary", name: "summary", widget: "text", hint: "1–2 sentences. This is the meta description AND the first thing an LLM extracts. Lead with the direct answer." }
      - label: "Section"
        name: "section"
        widget: "select"
        options: ["Getting Started", "Tutorials", "Analytics", "Setup", "Privacy & Security"]
        default: "Getting Started"
        hint: "Top-level section. Leave at the default unless you're moving the article."
      - label: "Glossary entry"
        name: "glossary"
        widget: "boolean"
        required: false
        default: false
        hint: "Tick if this is a glossary entry (term definition). Glossary entries get DefinedTerm schema.org markup and appear in the Glossary section of topic pages."
      - label: "Category"
        name: "category"
        widget: "relation"
        collection: "knowledge-categories"
        search_fields: ["label"]
        display_fields: ["label"]
        value_field: "{{filename}}"
        required: false
        hint: "Not used for Getting Started — leave blank."
      - { label: "Order", name: "order", widget: "number", value_type: "int", default: 999, hint: "Sort order within the section (lower first)." }
      - { label: "Author", name: "author", widget: "string", required: false, default: "Aura Vision Team" }
      - label: "Tags"
        name: "tags"
        widget: "list"
        required: false
        collapsed: true
        default: []
      - label: "Related Articles"
        name: "relatedArticles"
        widget: "list"
        required: false
        collapsed: true
        default: []
        hint: "Slugs of related articles (e.g. what-is-a-capture-rate). Shown at the bottom of the article."
      - label: "Published Date"
        name: "publishedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - label: "Updated Date"
        name: "updatedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - { label: "View Count", name: "viewCount", widget: "number", value_type: "int", required: false, hint: "Imported from Zoho — used to prioritise editorial expansion." }
      - { label: "Zoho ID", name: "zohoId", widget: "string", required: false, hint: "Traceability back to the original Zoho article." }
      - { label: "Original URL", name: "originalUrl", widget: "string", required: false }
      - { label: "Has Video", name: "hasVideo", widget: "boolean", required: false, default: false }
      - { label: "Body", name: "body", widget: "markdown", hint: "Follow the Getting Started template: 1-line orientation, 'What you'll cover here' bullets, main content, 'Next steps' links." }

  - name: "knowledge-analytics"
    label: "Knowledge — Analytics"
    label_singular: "Article"
    folder: "src/content/knowledge"
    create: true
    filter: { field: section, value: "Analytics" }
    path: "analytics/{{fields.category}}/{{slug}}"
    slug: "{{slug}}"
    sortable_fields: ["order", "category", "glossary", "title"]
    summary: "{{category}} · {{title}}"
    editor:
      size: half
    fields:
      - { label: "Title", name: "title", widget: "string", hint: "For definitions: the term itself (e.g. 'Entry rate'). For FAQs: the question (e.g. 'Do you count groups of people?')." }
      - { label: "Summary", name: "summary", widget: "text", hint: "1–2 sentences. For definitions, lead with the definition. For FAQs, lead with the direct answer. No hedges (usually/typically/may)." }
      - label: "Section"
        name: "section"
        widget: "select"
        options: ["Getting Started", "Tutorials", "Analytics", "Setup", "Privacy & Security"]
        default: "Analytics"
      - label: "Glossary entry"
        name: "glossary"
        widget: "boolean"
        required: false
        default: false
        hint: "Tick if this is a glossary entry (term definition). Glossary entries get DefinedTerm schema.org markup and appear in the Glossary section of topic pages."
      - label: "Category"
        name: "category"
        widget: "relation"
        collection: "knowledge-categories"
        search_fields: ["label"]
        display_fields: ["label"]
        value_field: "{{filename}}"
        required: false
        hint: "Pick the topic (Footfall, Areas, Heatmaps, Demographics, Conversion, Headcount)."
      - { label: "Order", name: "order", widget: "number", value_type: "int", default: 999, hint: "Within topic: definitions use low numbers (1–N alphabetical), FAQs use higher numbers (existing values from 101001 upward are fine to keep)." }
      - { label: "Author", name: "author", widget: "string", required: false, default: "Aura Vision Team" }
      - label: "Tags"
        name: "tags"
        widget: "list"
        required: false
        collapsed: true
        default: []
      - label: "Related Articles"
        name: "relatedArticles"
        widget: "list"
        required: false
        collapsed: true
        default: []
        hint: "Slugs of related articles. Currently advisory — not auto-rendered."
      - label: "Published Date"
        name: "publishedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - label: "Updated Date"
        name: "updatedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - { label: "View Count", name: "viewCount", widget: "number", value_type: "int", required: false, hint: "Imported from Zoho — used to prioritise editorial expansion." }
      - { label: "Zoho ID", name: "zohoId", widget: "string", required: false }
      - { label: "Original URL", name: "originalUrl", widget: "string", required: false }
      - { label: "Has Video", name: "hasVideo", widget: "boolean", required: false, default: false }
      - { label: "Body", name: "body", widget: "markdown", hint: "Definition: open with '**Term** is...' then how it's measured / why it matters / Related. FAQ: direct answer first, then worked example or steps, then Related." }

  - name: "knowledge-setup"
    label: "Knowledge — Setup"
    label_singular: "Article"
    folder: "src/content/knowledge"
    create: true
    filter: { field: section, value: "Setup" }
    path: "setup/{{fields.category}}/{{slug}}"
    slug: "{{slug}}"
    sortable_fields: ["order", "category", "glossary", "title"]
    summary: "{{category}} · {{title}}"
    editor:
      size: half
    fields:
      - { label: "Title", name: "title", widget: "string", hint: "For definitions: the term (e.g. 'APU', 'Entry line'). For FAQs: the question (e.g. 'How many cameras can be connected?')." }
      - { label: "Summary", name: "summary", widget: "text", hint: "1–2 sentences. Lead with the direct answer or definition." }
      - label: "Section"
        name: "section"
        widget: "select"
        options: ["Getting Started", "Tutorials", "Analytics", "Setup", "Privacy & Security"]
        default: "Setup"
      - label: "Glossary entry"
        name: "glossary"
        widget: "boolean"
        required: false
        default: false
        hint: "Tick if this is a glossary entry (term definition). Glossary entries get DefinedTerm schema.org markup and appear in the Glossary section of topic pages."
      - label: "Category"
        name: "category"
        widget: "relation"
        collection: "knowledge-categories"
        search_fields: ["label"]
        display_fields: ["label"]
        value_field: "{{filename}}"
        required: false
        hint: "Pick the topic (Installation, Integrations, Data access, Account & store admin, Troubleshooting)."
      - { label: "Order", name: "order", widget: "number", value_type: "int", default: 999, hint: "Within topic: definitions use low numbers (1–N alphabetical), FAQs use higher numbers." }
      - { label: "Author", name: "author", widget: "string", required: false, default: "Aura Vision Team" }
      - label: "Tags"
        name: "tags"
        widget: "list"
        required: false
        collapsed: true
        default: []
      - label: "Related Articles"
        name: "relatedArticles"
        widget: "list"
        required: false
        collapsed: true
        default: []
      - label: "Published Date"
        name: "publishedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - label: "Updated Date"
        name: "updatedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - { label: "View Count", name: "viewCount", widget: "number", value_type: "int", required: false }
      - { label: "Zoho ID", name: "zohoId", widget: "string", required: false }
      - { label: "Original URL", name: "originalUrl", widget: "string", required: false }
      - { label: "Has Video", name: "hasVideo", widget: "boolean", required: false, default: false }
      - { label: "Body", name: "body", widget: "markdown", hint: "Definition: '**Term** is...' + how it works + Related. FAQ: direct answer + steps or worked example + 'When to contact us' → support@auravision.ai." }

  - name: "knowledge-privacy"
    label: "Knowledge — Privacy & Security"
    label_singular: "Article"
    folder: "src/content/knowledge"
    create: true
    filter: { field: section, value: "Privacy & Security" }
    path: "privacy/{{fields.category}}/{{slug}}"
    slug: "{{slug}}"
    sortable_fields: ["order", "category", "glossary", "title"]
    summary: "{{category}} · {{title}}"
    editor:
      size: half
    fields:
      - { label: "Title", name: "title", widget: "string", hint: "For definitions: the concept (e.g. 'Face blurring', 'GDPR'). For FAQs: the question (e.g. 'Does it use facial recognition?')." }
      - { label: "Summary", name: "summary", widget: "text", hint: "1–2 sentences. LEAD WITH THE POSITIVE. Never start with 'Not currently' — say what we DO have. No clouds / regions / cipher names." }
      - label: "Section"
        name: "section"
        widget: "select"
        options: ["Getting Started", "Tutorials", "Analytics", "Setup", "Privacy & Security"]
        default: "Privacy & Security"
      - label: "Glossary entry"
        name: "glossary"
        widget: "boolean"
        required: false
        default: false
        hint: "Tick if this is a glossary entry (term definition). Glossary entries get DefinedTerm schema.org markup and appear in the Glossary section of topic pages."
      - label: "Category"
        name: "category"
        widget: "relation"
        collection: "knowledge-categories"
        search_fields: ["label"]
        display_fields: ["label"]
        value_field: "{{filename}}"
        required: false
        hint: "Pick the topic (AI & privacy, Security & compliance)."
      - { label: "Order", name: "order", widget: "number", value_type: "int", default: 999, hint: "Within topic: definitions use low numbers (1–N alphabetical), FAQs use higher numbers." }
      - { label: "Author", name: "author", widget: "string", required: false, default: "Aura Vision Team" }
      - label: "Tags"
        name: "tags"
        widget: "list"
        required: false
        collapsed: true
        default: []
      - label: "Related Articles"
        name: "relatedArticles"
        widget: "list"
        required: false
        collapsed: true
        default: []
      - label: "Published Date"
        name: "publishedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - label: "Updated Date"
        name: "updatedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - { label: "View Count", name: "viewCount", widget: "number", value_type: "int", required: false }
      - { label: "Zoho ID", name: "zohoId", widget: "string", required: false }
      - { label: "Original URL", name: "originalUrl", widget: "string", required: false }
      - { label: "Has Video", name: "hasVideo", widget: "boolean", required: false, default: false }
      - { label: "Body", name: "body", widget: "markdown", hint: "Definition: '**Term** is...' + how it works in plain English + Related. FAQ: direct positive answer + 'What this means in practice' + link to /security and /product-privacy for full architecture." }

  - name: "knowledge-tutorials"
    label: "Knowledge — Tutorials"
    label_singular: "Tutorial"
    folder: "src/content/knowledge"
    create: true
    filter: { field: section, value: "Tutorials" }
    path: "tutorials/{{slug}}"
    slug: "{{slug}}"
    sortable_fields: ["order", "title"]
    summary: "{{order}} · {{title}}"
    editor:
      size: half
    fields:
      - { label: "Title", name: "title", widget: "string", hint: "'How to [outcome]' — name the business outcome, not the feature." }
      - { label: "Summary", name: "summary", widget: "text", hint: "1 sentence: the business outcome a reader gets from this tutorial." }
      - label: "Section"
        name: "section"
        widget: "select"
        options: ["Getting Started", "Tutorials", "Analytics", "Setup", "Privacy & Security"]
        default: "Tutorials"
      - label: "Glossary entry"
        name: "glossary"
        widget: "boolean"
        required: false
        default: false
        hint: "Tick if this is a glossary entry (term definition). Glossary entries get DefinedTerm schema.org markup and appear in the Glossary section of topic pages."
      - label: "Category"
        name: "category"
        widget: "relation"
        collection: "knowledge-categories"
        search_fields: ["label"]
        display_fields: ["label"]
        value_field: "{{filename}}"
        required: false
        hint: "Not used for Tutorials — leave blank."
      - { label: "Order", name: "order", widget: "number", value_type: "int", default: 999 }
      - { label: "Author", name: "author", widget: "string", required: false, default: "Aura Vision Team" }
      - label: "Tags"
        name: "tags"
        widget: "list"
        required: false
        collapsed: true
        default: []
      - label: "Related Articles"
        name: "relatedArticles"
        widget: "list"
        required: false
        collapsed: true
        default: []
      - label: "Published Date"
        name: "publishedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - label: "Updated Date"
        name: "updatedDate"
        widget: "datetime"
        date_format: "YYYY-MM-DD"
        time_format: false
        format: "YYYY-MM-DD"
        required: false
      - { label: "View Count", name: "viewCount", widget: "number", value_type: "int", required: false }
      - { label: "Zoho ID", name: "zohoId", widget: "string", required: false }
      - { label: "Original URL", name: "originalUrl", widget: "string", required: false }
      - { label: "Has Video", name: "hasVideo", widget: "boolean", required: false, default: false }
      - { label: "Body", name: "body", widget: "markdown", hint: "Tutorial template: outcome (lead sentence), 'Who it's for', 'What the video covers' (numbered steps), embedded Scribe iframe." }

  - name: "knowledge-categories"
    label: "Knowledge Categories"
    label_singular: "Category"
    folder: "src/content/knowledge-categories"
    create: true
    nested:
      depth: 2
    slug: "{{slug}}"
    sortable_fields: ["section", "order", "label"]
    summary: "{{section}} · {{label}}"
    editor:
      size: half
    fields:
      - { label: "Label", name: "label", widget: "string", hint: "Display name shown in the sidebar and on the FAQ index (e.g. 'Metrics')." }
      - label: "Section"
        name: "section"
        widget: "select"
        options: ["Getting Started", "Tutorials", "Analytics", "Setup", "Privacy & Security"]
        hint: "Top-level section this category belongs to."
      - { label: "Order", name: "order", widget: "number", value_type: "int", hint: "Lower numbers appear first within the section." }
      - { label: "Description", name: "description", widget: "text", hint: "One-line description shown under the icon on the FAQ index." }
      - label: "Icon"
        name: "iconName"
        widget: "select"
        options:
          - Rocket
          - Footprints
          - Map
          - Activity
          - Users
          - Flame
          - UsersRound
          - Download
          - Building2
          - AlertTriangle
          - ShieldCheck
          - Calendar
          - BarChart3
          - Megaphone
          - Wrench
          - Cable
          - Lock
          - Sparkles
          - Plug
          - Settings
        hint: "Lucide icon name. To add more, extend src/components/CategoryIcon.astro."
