Is your feature request related to a problem? Please describe.
When I edit a title with FM and it removes the quotes, I might accidentally add invalid characters to the title manually outside of FM. Removing/adding quotes as necessary is only good if you exclusively edit the content in FM, which isn't true for me.
Describe the solution you'd like
Just like how we have a frontMatter.taxonomy.noPropertyValueQuotes option to force remove quotes from some fields, it would be nice if we had a frontmatter.taxonomy.forcePropertyValueQuotes option that would let me say "always quote the title and description fields" (because I know it is too risky for FM to remove the quotes).
ASIDE: both of these options probably belong as options on the fields themselves, right? I suggested putting it in the same place as noPropertyValueQuotes but perhaps it should be on the field (setting.frontMatter.taxonomy.contentTypes.items.properties.fields.description)?
The other reason: I frankly prefer the consistency of my title and description fields always being quoted. Having it be as-needed makes it inconsistent and I don't love that.
Describe alternatives you've considered
I can't think of any alternatives that solve my issues. And these are definitely issues I can live with, so no alternatives are strictly required!
**Is your feature request related to a problem? Please describe.**
When I edit a title with FM and it removes the quotes, I might accidentally add invalid characters to the title manually outside of FM. Removing/adding quotes as necessary is only good if you exclusively edit the content in FM, which isn't true for me.
**Describe the solution you'd like**
Just like how we have a [`frontMatter.taxonomy.noPropertyValueQuotes`](https://frontmatter.codes/docs/settings/overview#frontmatter.taxonomy.nopropertyvaluequotes) option to force remove quotes from some fields, it would be nice if we had a `frontmatter.taxonomy.forcePropertyValueQuotes` option that would let me say "always quote the title and description fields" (because I know it is too risky for FM to remove the quotes).
ASIDE: both of these options probably belong as options on the fields themselves, right? I suggested putting it in the same place as `noPropertyValueQuotes` but perhaps it should be on the field (`setting.frontMatter.taxonomy.contentTypes.items.properties.fields.description`)?
The other reason: I frankly prefer the consistency of my `title` and `description` fields always being quoted. Having it be as-needed makes it inconsistent and I don't love that.
**Describe alternatives you've considered**
I can't think of any alternatives that solve my issues. And these are definitely issues I can live with, so no alternatives are strictly required!
<!-- github-sync-id:2001204344 -->
Thanks @altano, makes sense to have this option. Just checked in the YAML parser we use and we can configure it for all string fields. The easiest option will be to add a new setting to always quote strings.
Thanks @altano, makes sense to have this option. Just checked in the YAML parser we use and we can configure it for all string fields. The easiest option will be to add a new setting to always quote strings.
<!-- github-comment-id:1824518745 -->
I've added the frontMatter.taxonomy.quoteStringValues setting, which is by default false as it will not change the current behaviour.
If you want to gain the consistency of always wrapping your string values with quotes, you can enable this with the setting as follows in the frontmatter.json file:
{"frontMatter.taxonomy.quoteStringValues":true}
Testable in the latest beta version.
I've added the `frontMatter.taxonomy.quoteStringValues` setting, which is by default `false` as it will not change the current behaviour.
If you want to gain the consistency of always wrapping your string values with quotes, you can enable this with the setting as follows in the `frontmatter.json` file:
```json
{
"frontMatter.taxonomy.quoteStringValues": true
}
```
Testable in the latest beta version.
<!-- github-comment-id:1824526496 -->
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.
Is your feature request related to a problem? Please describe.
When I edit a title with FM and it removes the quotes, I might accidentally add invalid characters to the title manually outside of FM. Removing/adding quotes as necessary is only good if you exclusively edit the content in FM, which isn't true for me.
Describe the solution you'd like
Just like how we have a
frontMatter.taxonomy.noPropertyValueQuotesoption to force remove quotes from some fields, it would be nice if we had afrontmatter.taxonomy.forcePropertyValueQuotesoption that would let me say "always quote the title and description fields" (because I know it is too risky for FM to remove the quotes).ASIDE: both of these options probably belong as options on the fields themselves, right? I suggested putting it in the same place as
noPropertyValueQuotesbut perhaps it should be on the field (setting.frontMatter.taxonomy.contentTypes.items.properties.fields.description)?The other reason: I frankly prefer the consistency of my
titleanddescriptionfields always being quoted. Having it be as-needed makes it inconsistent and I don't love that.Describe alternatives you've considered
I can't think of any alternatives that solve my issues. And these are definitely issues I can live with, so no alternatives are strictly required!
Thanks @altano, makes sense to have this option. Just checked in the YAML parser we use and we can configure it for all string fields. The easiest option will be to add a new setting to always quote strings.
I've added the
frontMatter.taxonomy.quoteStringValuessetting, which is by defaultfalseas it will not change the current behaviour.If you want to gain the consistency of always wrapping your string values with quotes, you can enable this with the setting as follows in the
frontmatter.jsonfile:Testable in the latest beta version.