Netlify CMS is configured to allow multiple values for this field. Unfortunately, it seems that if you edit a dataset with a string value (as in the first example above), the UI shows the field as blank.
Fortunately, if you save, it keeps the existing category value (unless you change the category), so it won't lose the value, but it can be confusing for users.
It would be great if we could submit a PR to Netlify CMS to fix this. But in the meantime, it might be worth adding a linter of some sort to JKAN to enforce a schema. We could also add it to a jekyll upgrade-jkan CLI (to fix any string values).
EDIT: I previously thought this would silently drop existing category values, but I've confirmed that it doesn't.
JKAN supports two types of values for a dataset's
category
: a string (for a single category), or an array of strings (for multiple categories).Netlify CMS is configured to allow multiple values for this field. Unfortunately, it seems that if you edit a dataset with a string value (as in the first example above), the UI shows the field as blank.
Fortunately, if you save, it keeps the existing category value (unless you change the category), so it won't lose the value, but it can be confusing for users.
It would be great if we could submit a PR to Netlify CMS to fix this. But in the meantime, it might be worth adding a linter of some sort to JKAN to enforce a schema. We could also add it to a
jekyll upgrade-jkan
CLI (to fix any string values).EDIT: I previously thought this would silently drop existing category values, but I've confirmed that it doesn't.