It appears that the documentation either lost content or omits how to configure arrays in the data screen. I have the following configuration in data/files/kurzschnitte.json:
The screen shows the Labels field, but nothing happens on click. I would expect a string field to be added.
The documentation has nothing about array types that I can find. The samples also contain only string fields, so the label configuration is something I have from a config file from around 1 or 2 years ago.
What is the proper way to configure array fields?
It appears that the documentation either lost content or omits how to configure _arrays_ in the data screen. I have the following configuration in `data/files/kurzschnitte.json`:
```json
{
"$schema": "https://frontmatter.codes/config/data.files.schema.json",
"id": "kurzschnitte",
"title": "Kurzschnitte",
"file": "[[workspace]]/data/dnb/kollitsch/kurzschnitte.json",
"fileType": "json",
"labelField": "title",
"singleEntry": false,
"schema": {
"title": "Kurzschnitte",
"type": "object",
"required": [
"title",
"link",
"slug"
],
"properties": {
"title": {
"type": "string",
"title": "Title"
},
"link": {
"type": "string",
"title": "Link"
},
"description": {
"type": "string",
"multiline": true,
"title": "Description"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"slug": {
"type": "string",
"title": "Kurzschnitt-Post"
},
}
}
}
```
The screen shows the Labels field, but nothing happens on click. I would expect a string field to be added.
The documentation has nothing about array types that I can find. The samples also contain only string fields, so the label configuration is something I have from a config file from around 1 or 2 years ago.
What is the proper way to configure array fields?
<!-- github-sync-id:1849720748 -->
@davidsneighbour I'm facing the same issue. I posted my question on Discord because I don't know if the issue is with me or a bug with FrontMatter.
I've added my fields directly inside the JSON file to see if the FrontMatter UI would pick them up. It does. Through the UI, I can remove existing items belonging to an array as well as delete them, but I can not add more items.
@davidsneighbour I'm facing the same issue. I posted my question on Discord because I don't know if the issue is with me or a bug with FrontMatter.
I've added my fields directly inside the JSON file to see if the FrontMatter UI would pick them up. It does. Through the UI, I can remove existing items belonging to an array as well as delete them, but I can not add more items.
If you're on Discord, here's the thread I started: https://discord.com/channels/992409023607476224/1140404917845119097
<!-- github-comment-id:1677300770 -->
Thanks @davidsneighbour and @djmtype; there seems to be something wrong with the array field. Will investigate this further.
Thanks @davidsneighbour and @djmtype; there seems to be something wrong with the array field. Will investigate this further.
<!-- github-comment-id:1680109499 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
It appears that the documentation either lost content or omits how to configure arrays in the data screen. I have the following configuration in
data/files/kurzschnitte.json:The screen shows the Labels field, but nothing happens on click. I would expect a string field to be added.
The documentation has nothing about array types that I can find. The samples also contain only string fields, so the label configuration is something I have from a config file from around 1 or 2 years ago.
What is the proper way to configure array fields?
@davidsneighbour I'm facing the same issue. I posted my question on Discord because I don't know if the issue is with me or a bug with FrontMatter.
I've added my fields directly inside the JSON file to see if the FrontMatter UI would pick them up. It does. Through the UI, I can remove existing items belonging to an array as well as delete them, but I can not add more items.
If you're on Discord, here's the thread I started: https://discord.com/channels/992409023607476224/1140404917845119097
Thanks @davidsneighbour and @djmtype; there seems to be something wrong with the array field. Will investigate this further.
Found the issue. This should work as expected in the latest beta version.