This is a great enhancement, as a CMS requires user inputs to match rules in the code. As a further enhancement, it may be beneficial to allow setting the type to a string or an array. Because this is a developer concern, it may be good enough to assume that a limit of a single selection would be a string. A markdown front-matter structure has limited data types available, and I believe that enforcing a data type would make this more robust. Target parsers will output data differently based on these types. Thanks!
This is a great enhancement, as a CMS requires user inputs to match rules in the code. As a further enhancement, it may be beneficial to allow setting the type to a string or an array. Because this is a developer concern, it may be good enough to assume that a limit of a single selection would be a string. A markdown front-matter structure has limited data types available, and I believe that enforcing a data type would make this more robust. Target parsers will output data differently based on these types. Thanks!
_Originally posted by @johnfuller in https://github.com/estruyf/vscode-front-matter/issues/241#issuecomment-1046998565_
<!-- github-sync-id:1154285391 -->
I tried making a taxonomy because I would love to look at posts by their "post_type" but I cant do this without converting post_type to an array with a limit of one and thats not an easy lift with some automation I am using.
Just want add a +1 here.
I tried making a taxonomy because I would love to look at posts by their "post_type" but I cant do this without converting post_type to an array with a limit of one and thats not an easy lift with some automation I am using.
<!-- github-comment-id:1776208556 -->
This functionality will be added by the new singleValueAsString field property which you can set on the tags, categories, and customTaxonomy fields.
By default, it will be set to false, when set to true, when the array has a single value, it will be set as a string.
This functionality will be added by the new `singleValueAsString` field property which you can set on the `tags`, `categories`, and `customTaxonomy` fields.
By default, it will be set to `false`, when set to `true`, when the array has a single value, it will be set as a `string`.
<!-- github-comment-id:1777181511 -->
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.
This is a great enhancement, as a CMS requires user inputs to match rules in the code. As a further enhancement, it may be beneficial to allow setting the type to a string or an array. Because this is a developer concern, it may be good enough to assume that a limit of a single selection would be a string. A markdown front-matter structure has limited data types available, and I believe that enforcing a data type would make this more robust. Target parsers will output data differently based on these types. Thanks!
Originally posted by @johnfuller in https://github.com/estruyf/vscode-front-matter/issues/241#issuecomment-1046998565
Just want add a +1 here.
I tried making a taxonomy because I would love to look at posts by their "post_type" but I cant do this without converting post_type to an array with a limit of one and thats not an easy lift with some automation I am using.
This functionality will be added by the new
singleValueAsStringfield property which you can set on thetags,categories, andcustomTaxonomyfields.By default, it will be set to
false, when set totrue, when the array has a single value, it will be set as astring.@cvburgess you are able to give it a try in the latest beta version.
Example field configuration:
That worked PERFECTLY for me - thank you SO MUCH!
Happy to hear!