Hello, I have a question about frontmatter formating in the Netlify CMS.
I am trying to use the CMS to create posts which will have tags for use with the eleventy SSG. I would like to use the relation widget to find available tags from another collection. I can use the relation widget in a list to populate the fields, but the frontmatter is not formatted in a way that Eleventy can use. Eleventy requires a tags to be formatted as a list/array or string in order to consume during the build process.
I tried using the default yml frontmatter as well as json and toml. It seems that the list widget does not actually output a list/array.
Is there a configuration option for this?
Here are some examples of the output
YML
Using select widget I can get the correct YML output. These tags will generate collections in Eleventy by default. However, I must preset the values in the config.yml file for them to populate in the select widget.
tags:
- tag1
- tag2
- tag3
I tried to use the list widget containing relation fields. The fields populate based on the collections which is great, but the output in the frontmatter does not include hyphens for each item which causes Eleventy to ignore them.
tags:
- tag1
tag2
tag3
I tried using JSON and TOML frontmatter.
This is the output from the select widget. Again the select widget works fine as it outputs an array.
"tags": [
"tag1",
"tag2"
]
However when using the list widget containing relation widgets the output is in object format which Eleventy ignores.
"tags": [
{
"name": "tag1",
"othername": "tag2"
}
]
Is there a configuration option available for the list widget to output an array?