backend:
  name: git-gateway
  branch: main
  commit_messages:
    create: 'Content: create {{collection}} "{{slug}}"'
    update: 'Content: update {{collection}} "{{slug}}"'
    delete: 'Content: delete {{collection}} "{{slug}}"'
    uploadMedia: 'Media: upload "{{path}}"'
    deleteMedia: 'Media: delete "{{path}}"'

# IMPORTANT: User permissions are controlled through:
# 1. Git repository access permissions
# 2. Netlify Identity (if using Netlify)
# 3. Branch protection rules
# 4. Editorial workflow (prevents direct publishing)

local_backend: true

media_folder: "src/assets/images"
public_folder: "src/assets/images"

# Editorial workflow ensures all content must be reviewed before publishing
publish_mode: editorial_workflow

logo_url: /favicon/android-chrome-192x192.png

collections:
  - name: "blog"
    label: "Blog Posts"
    folder: "src/content/blog"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    # Editorial workflow ensures content review before publishing
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Description", name: "description", widget: "text" }
      - { label: "Publish Date", name: "publishDate", widget: "datetime" }
      - { label: "Updated Date", name: "updatedDate", widget: "datetime", required: false }
      - { label: "Tags", name: "tags", widget: "list", field: { label: "Tag", name: "tag", widget: "string" } }
      - { label: "Language", name: "language", widget: "string" }
      - { label: "Author", name: "author", widget: "string" }
      - { label: "Author Avatar", name: "authorAvatar", widget: "image", required: false }
      - { label: "Hero Image", name: "heroImage", widget: "image", required: false }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "activities"
    label: "Activities"
    folder: "src/content/activities"
    create: true
    slug: "{{slug}}"
    # Editorial workflow ensures content review before publishing
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Description", name: "description", widget: "text" }
      - { label: "Publish Date", name: "publishDate", widget: "datetime" }
      - { label: "Tags", name: "tags", widget: "list", field: { label: "Tag", name: "tag", widget: "string" } }
      - { label: "Activity Type", name: "activityType", widget: "select", options: ["event", "workshop", "meetup", "conference", "project"] }
      - { label: "Location", name: "location", widget: "string", required: false }
      - { label: "Duration", name: "duration", widget: "string" }
      - { label: "Participants", name: "participants", widget: "number", required: false }
      - { label: "Author", name: "author", widget: "string" }
      - { label: "Author Avatar", name: "authorAvatar", widget: "image", required: false }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "docs"
    label: "Documentation"
    folder: "src/content/docs"
    create: true
    slug: "{{slug}}"
    # Editorial workflow ensures content review before publishing
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Description", name: "description", widget: "text" }
      - { label: "Order", name: "order", widget: "number" }
      - { label: "Author", name: "author", widget: "string" }
      - { label: "Author Avatar", name: "authorAvatar", widget: "image", required: false }
      - { label: "Body", name: "body", widget: "markdown" }