## Comment out when doing local development
backend:
  name: github
  repo: GCERC/site
  base_url: https://pages.cloud.gov
  auth_endpoint: external/auth/github
  preview_context: pages/build
  branch: main
  use_graphql: true

##
## Uncomment when doing local development on Netlify CMS
## Run `npx netlify-cms-proxy-server` to start working locally
## In another terminal, start the app with `npm start`
## See https://www.netlifycms.org/docs/beta-features/#working-with-a-local-git-repository
##

# backend:
#   name: git-gateway
# local_backend: true

media_folder: img
public_folder: /img
publish_mode: editorial_workflow
logo_url: https://pages.cloud.gov/images/logos/pages-logo-blue.svg

editor:
  preview: false

collections:
  - name: "announcements"
    label: "Announcements"
    folder: "collections/announcements"
    create: true
    editor:
      preview: false
    slug: "{{date}}-{{slug}}"
    summary: "[{{date}}] {{title}}"
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - {
          label: "Created",
          name: "date",
          date_format: "YYYY-MM-DD",
          default: "{{now}}",
          widget: "datetime",
        }
      - { label: "Body", name: "body", widget: "markdown" }
  - label: "Pages"
    name: "pages"
    files:
      - label: "Members"
        name: "about"
        file: "pages/who-we-are/council-members.md"
        fields:
          - label: Members
            name: members
            widget: list
            fields:
              - { label: Name, name: name, widget: string }
              - { label: Agency, name: agency, widget: string }
              - { label: Title, name: title, widget: string }
              - label: "Photo"
                name: "photo"
                widget: "image"
                allow_multiple: false
                choose_url: false
                required: false
              - label: "Delegates"
                name: "delegates"
                widget: "list"
                fields:
                  - label: "Type"
                    name: "type"
                    widget: "select"
                    options: ["Designee", "Representative", "Alternate"]
                  - { label: Name, name: name, widget: string }
                  - {
                      label: Agency,
                      name: agency,
                      widget: string,
                      required: false,
                    }
                  - {
                      label: Title,
                      name: title,
                      widget: string,
                      required: false,
                    }
