backend:
  name: git-gateway
  branch: master

publish_mode: editorial_workflow

media_folder: "public/uploads"
public_folder: "/uploads"

collections:
  - name: "blog" 
    label: "Blog" 
    folder: "src/pages/blog" 
    create: true 
    fields: 
      - { label: "Layout", name: "layout", widget: "hidden", default: "../../layouts/MarkdownPostLayout.astro" }
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Subtitle", name: "subtitle", widget: "string"}
      - { label: "Publish Date", name: "date", widget: "datetime" }
      - { label: "Thumbnail", name: "heroImage", widget: "image" }
      - { label: "Body", name: "body", widget: "markdown" }

  - name: "resources"
    label: "Resources"
    folder: "src/pages/resources"
    create: true
    fields: 
      - { label: "Layout", name: "layout", widget: "hidden", default: "../../layouts/ResourcesPostLayout.astro" }
      - { label: "Title", name: "title", widget: "string"}
      - { label: "Thumbnail", name: "thumbnail", widget: "image"}
      - { label: "File", name: "file", widget: "file"}

  - name: "gallery"
    label: "Gallery"
    folder: "src/pages/gallery"
    create: true
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Layout", name: "layout", widget: "hidden", default: "../../layouts/GalleryPostLayout.astro" }
      - label: "Images"
        name: "images"
        widget: "list"
        allow_add: true
        fields:
          - { label: "Image", name: "image", widget: "image" }
          - { label: "Caption", name: "caption", widget: "string", required: true }
      - label: "Thumbnail"
        name: "thumbnail"
        widget: "image"
        media_library:
          config:
            multiple: false
