So, I built another 11ty site but I need multiple collections to work and I’m unfamiliar with that process. Here’s my current attempt with my current config.yml
backend:
name: git-gateway
branch: main
media_folder: "public/assets/guides-img"
public_folder: "/assets/guides-img"
collections:
- name: "guide"
label: "guides"
folder: "src/guide"
create: true
slug: "{{year}}-{{month}}-{{slug}}"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Description", name: "description", widget: "string" }
- { label: "Date", name: "date", widget: "datetime" }
- { label: "Tags", name: "tags", widget: "list", default: ["guides"] }
- { label: "Featured Image", name: "image", widget: "image" }
- { label: "Image Caption", name: "imageAlt", widget: "string" }
- { label: "Body", name: "body", widget: "markdown" }
- name: "pages"
label: "page"
folder: "src/pages"
create: true
slug: "{{slug}}"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Body", name: "body", widget: "markdown" }
Now here’s the error it gives me
Config Errors:
YAMLSyntaxError: All collection items must start at the same column at line 1, column 1:
backend:
^^^^^^^^…
Check your config.yml file.
I know for sure the error only occurs when I add in the second collection (i tested it)
So can someone please help me figure this out?
Thanks