Hi, I’m having a hard time trying to write my config.yml to use it in netlify cms… everything is working great, but I’m having problems with the object field. It’s the first time that I use YAML so maybe I’m not seeing the obvious, but I appreciate the help.
I know this is something very specific, I already ask for help in the netlify forum, but if someone can help me with the YAML cause maybe I have a syntax problem or something that someone knows, I’d really appreciate it.
backend:
name: git-gateway
branch: gh-pages
media_folder: assets/img
public_folder: /img
collections:
- name: 'projects'
label: 'Projects'
folder: 'content/projects'
format: 'frontmatter'
create: true
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
editor:
preview: false
fields:
- { label: 'Title', name: 'title', widget: 'string' }
- {
label: 'Short Descripcion',
name: 'short_description',
widget: 'string',
}
- {
label: 'Long Description',
name: 'long_description',
widget: 'string',
}
- {
label: 'Tags',
name: 'tags',
widget: 'select',
multiple: true,
min: 1,
max: 3,
options: ['Social Media Design', 'Web Design', 'Art Direction'],
}
- {
label: 'Thumbnail',
name: 'thumbnail',
widget: 'image',
allow_multiple: false,
}
- {
label: 'Project Images',
name: 'images',
widget: 'object',
fields:
- {label: 'RRSS Images', name: 'rrss', widget: 'image', allow_multiple: true, }
- {label: 'WEB Images', name: 'web', widget: 'image', allow_multiple: true, }
}
The problem happen in this part in the fields… property?
- {
label: 'Project Images',
name: 'images',
widget: 'object',
fields:
- {label: 'RRSS Images', name: 'rrss', widget: 'image', allow_multiple: true, }
- {label: 'WEB Images', name: 'web', widget: 'image', allow_multiple: true, }
}
BTW this the error that shows me…
Error loading the CMS configuration
Config Errors:
YAMLSemanticError: Separator , missing in flow map at line 49, column 15:
- {label: 'RRSS Images', name: 'rrss', widget: 'image', allow_multi…
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
Check your config.yml file.