backend:
  name: github
  repo: broadbaseai/recipes
  # Set this to your deployment branch (main for production).
  branch: main
  # base_url must be the live origin that serves the OAuth functions below —
  # i.e. the same domain you open /admin/ on. Use your *.netlify.app URL here
  # while testing, then switch to the custom domain once it's connected.
  base_url: https://cookpit.recipes
  auth_endpoint: /.netlify/functions/auth

# "View live site" links inside the CMS.
site_url: https://cookpit.recipes
display_url: https://cookpit.recipes

# Media (images) uploaded via the CMS land here. Recipe .jsonld files are
# uploaded into the drafts collection below, then moved (via git or the GitHub
# web UI) into content/recipes/published/ to go live.
media_folder: public/uploads
public_folder: /uploads

collections:
  # Upload new cookpit files here. They are Drafts by default — never deployed
  # until moved into the published folder.
  - name: drafts
    label: "Recipe Drafts (upload here)"
    label_singular: "Recipe Draft"
    folder: content/recipes/drafts
    extension: jsonld
    format: json
    create: true
    delete: true
    summary: "{{fields.name}}"
    fields:
      - { label: "Name", name: "name", widget: "string" }

  # Browse-only view of the live recipes.
  # ⚠️ Do not open/re-save these — they are signed and served byte-for-byte.
  - name: published
    label: "Published Recipes (browse only)"
    label_singular: "Published Recipe"
    folder: content/recipes/published
    extension: jsonld
    format: json
    create: false
    delete: false
    summary: "{{fields.name}}"
    fields:
      - { label: "Name", name: "name", widget: "string" }
