Home
Support Forums

Netlify CMS config error

I’m trying to set up a website with 11ty and netlify cms but whenever I try to go to my admin panel I get this

Config Errors:
config must have required property 'media_folder'
config must have required property 'media_library'
config must match a schema in anyOf
config must have required property 'collections'
Check your config.yml file.

Here is my complete config.yml

backend:
  name: git-gateway
  branch: main

  media_folder: "public/assets/blog"
  public_folder: "/assets/blog"
  collections: 
  - name: "blog"
    label: "Blog"
    folder: "src/blog"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields: 
      - { label: "Title", name: "title", widget: "string" } 
      - { label: "Description", name: "description", widget: "string" }
      - { label: "Author", name: "Author", widget: "string" }
      - { label: "Date", name: "date", widget: "datetime" }
      - { label: "Tags", name: "tags", widget: "list", default: ["post"] }
      - { label: "Featured Image", name: "image", widget: "image" }
      - { label: "Image Caption", name: "imageAlt", widget: "string" }
      - { label: "Body", name: "body", widget: "markdown" }
   

Can someone help?

hi there, before we assist, can you please edit your post’s title to something shorter and more succinct that helps others find your post? that helps you and us. thank you!

Your config isn’t indented the right way:

backend:
  name: git-gateway
  branch: main

media_folder: "public/assets/blog"
public_folder: "/assets/blog"
collections: 
  - name: "blog"
    label: "Blog"
    folder: "src/blog"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields: 
      - { label: "Title", name: "title", widget: "string" } 
      - { label: "Description", name: "description", widget: "string" }
      - { label: "Author", name: "Author", widget: "string" }
      - { label: "Date", name: "date", widget: "datetime" }
      - { label: "Tags", name: "tags", widget: "list", default: ["post"] }
      - { label: "Featured Image", name: "image", widget: "image" }
      - { label: "Image Caption", name: "imageAlt", widget: "string" }
      - { label: "Body", name: "body", widget: "markdown" }
   

Holy Cow you are a lifesaver! Thank you so much @tomrutgers and @perry !

1 Like

Good to hear, happy to help!