Is your feature request related to a problem? Please describe.
When using Pelican markdown files with frontmatter I get several issues:
Tags are added a quote all together, I guess because it expects array type with quoted items, which is not the case with Pelican
date and modified are quoted... again, not what Pelican expects, causing failures on rendering
Describe the solution you'd like
Allow configurable 'frontmatter' styling for 'hugo', 'pelican' or others
Describe alternatives you've considered
So far, disabling and uninstalling the extension as it was breaking the articles I've. I've tried setting date format in settings and not add quotes, but still it adds them.
**Is your feature request related to a problem? Please describe.**
When using Pelican markdown files with frontmatter I get several issues:
- Tags are added a quote all together, I guess because it expects array type with quoted items, which is not the case with Pelican
- date and modified are quoted... again, not what Pelican expects, causing failures on rendering
**Describe the solution you'd like**
Allow configurable 'frontmatter' styling for 'hugo', 'pelican' or others
**Describe alternatives you've considered**
So far, disabling and uninstalling the extension as it was breaking the articles I've. I've tried setting date format in settings and not add quotes, but still it adds them.
<!-- github-sync-id:996970682 -->
BTW I've found the "frontMatter.taxonomy.noPropertyValueQuotes": ["modified", "date", "tags"], but I think that a dropdown to select compatibility will make it easier ;-)
BTW I've found the "frontMatter.taxonomy.noPropertyValueQuotes": ["modified", "date", "tags"], but I think that a dropdown to select compatibility will make it easier ;-)
<!-- github-comment-id:919936860 -->
Thank @iranzo for reporting this. The frontMatter.taxonomy.noPropertyValueQuotes setting is exactly meant for this. As some need quotes, and others don't.
Having an optimized settings experience is on backlog #80. The dropdown would be a nice addition to it.
I did some tests, and in the projects, I use for testing it is working as expected, but it might be because of all use YAML.
What is Pelican using? Would you be able to share a sample page with the front matter and content?
Thank @iranzo for reporting this. The `frontMatter.taxonomy.noPropertyValueQuotes` setting is exactly meant for this. As some need quotes, and others don't.
Having an optimized settings experience is on backlog #80. The dropdown would be a nice addition to it.
I did some tests, and in the projects, I use for testing it is working as expected, but it might be because of all use `YAML`.
What is Pelican using? Would you be able to share a sample page with the front matter and content?
<!-- github-comment-id:919943352 -->
Pelican is also using YAML, for example: https://github.com/iranzo/iranzo.github.io/blob/master/content/2021-09-11-rhel8-administration.en.md
<!-- github-comment-id:919947368 -->
I think that there are other things involved in the way Frontmatter processes the files:
Even if the quotes are not enabled to be used, seems that it tries to read those as 'hugo'-style keys/values
I think that there are other things involved in the way Frontmatter processes the files:

Even if the quotes are not enabled to be used, seems that it tries to read those as 'hugo'-style keys/values
<!-- github-comment-id:919955467 -->
Hugo doesn't use a style, they use YAML format, like other site generators. It is gray-matter which does the parsing.
I'll validate it against your blog content, thanks for the reference.
Hugo doesn't use a style, they use YAML format, like other site generators. It is `gray-matter` which does the parsing.
I'll validate it against your blog content, thanks for the reference.
<!-- github-comment-id:919986261 -->
Sorry, for 'style' I meant for arrays, pelican uses comma separated words, but seems that it expects a [ and ] for specifying more than one tag
Sorry, for 'style' I meant for arrays, pelican uses comma separated words, but seems that it expects a `[` and `]` for specifying more than one tag
<!-- github-comment-id:919987145 -->
The title contains [] - so the YAML parser thinks you're adding an array
Arrays in YAML can be [] or like:
tags:
- tag 1
- tag 2
There are two issues:
1. The title contains `[]` - so the YAML parser thinks you're adding an array
2. Arrays in YAML can be `[]` or like:
```
tags:
- tag 1
- tag 2
```
<!-- github-comment-id:919990881 -->
Yes, and 'neither' example 1, or example 2 are taken by pelican (I guess it should), but only parses keywords as comma-separated words
Yes, and 'neither' example 1, or example 2 are taken by pelican (I guess it should), but only parses keywords as comma-separated words
<!-- github-comment-id:919993517 -->
The title will need to be manually escaped. I will add a title input on the panel as well soon so that it will automatically escape it for you.
The title will need to be manually escaped. I will add a title input on the panel as well soon so that it will automatically escape it for you.


<!-- github-comment-id:919996588 -->
As the comma-separated arrays are not valid YAML, you will have to let Front Matter know how to parse it. That is why the new frontMatter.taxonomy.commaSeparatedFields is introduced.
Be sure to uninstall the main version, as the two cannot run or be installed at the same time.
I got good news, I changed some internal logic and the new version will be able to work with comma-separated array values.
In order to support this, you'll have to do the following in your `settings.json`:
```
{
"frontMatter.taxonomy.commaSeparatedFields": [
"tags"
],
"frontMatter.taxonomy.noPropertyValueQuotes": [
"tags"
],
"frontMatter.taxonomy.tags": [
"Packt Publishing",
"RHCSA",
"RHEL",
"book",
"system administration",
"foss"
]
}
```
As the comma-separated arrays are not valid YAML, you will have to let Front Matter know how to parse it. That is why the new `frontMatter.taxonomy.commaSeparatedFields` is introduced.
If you want to test it out, you can install the beta version of Front Matter: https://beta.frontmatter.codes - https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta
Be sure to uninstall the main version, as the two cannot run or be installed at the same time.
<!-- github-comment-id:920092617 -->
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 using Pelican markdown files with frontmatter I get several issues:
Describe the solution you'd like
Allow configurable 'frontmatter' styling for 'hugo', 'pelican' or others
Describe alternatives you've considered
So far, disabling and uninstalling the extension as it was breaking the articles I've. I've tried setting date format in settings and not add quotes, but still it adds them.
BTW I've found the "frontMatter.taxonomy.noPropertyValueQuotes": ["modified", "date", "tags"], but I think that a dropdown to select compatibility will make it easier ;-)
Thank @iranzo for reporting this. The
frontMatter.taxonomy.noPropertyValueQuotessetting is exactly meant for this. As some need quotes, and others don't.Having an optimized settings experience is on backlog #80. The dropdown would be a nice addition to it.
I did some tests, and in the projects, I use for testing it is working as expected, but it might be because of all use
YAML.What is Pelican using? Would you be able to share a sample page with the front matter and content?
Pelican is also using YAML, for example: https://github.com/iranzo/iranzo.github.io/blob/master/content/2021-09-11-rhel8-administration.en.md
I think that there are other things involved in the way Frontmatter processes the files:
Even if the quotes are not enabled to be used, seems that it tries to read those as 'hugo'-style keys/values
Hugo doesn't use a style, they use YAML format, like other site generators. It is
gray-matterwhich does the parsing.I'll validate it against your blog content, thanks for the reference.
Sorry, for 'style' I meant for arrays, pelican uses comma separated words, but seems that it expects a
[and]for specifying more than one tagThere are two issues:
[]- so the YAML parser thinks you're adding an array[]or like:Yes, and 'neither' example 1, or example 2 are taken by pelican (I guess it should), but only parses keywords as comma-separated words
The title will need to be manually escaped. I will add a title input on the panel as well soon so that it will automatically escape it for you.
I got good news, I changed some internal logic and the new version will be able to work with comma-separated array values.
In order to support this, you'll have to do the following in your
settings.json:As the comma-separated arrays are not valid YAML, you will have to let Front Matter know how to parse it. That is why the new
frontMatter.taxonomy.commaSeparatedFieldsis introduced.If you want to test it out, you can install the beta version of Front Matter: https://beta.frontmatter.codes - https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta
Be sure to uninstall the main version, as the two cannot run or be installed at the same time.
Great, it seems to work fine with the tags, looking forward for the autoescape too!
Thanks a lot!