Originally posted by rshmhrj November 6, 2022
Hi all!
First -- thanks for all the work on this awesome extension. I have found it extremely useful in setting up and maintaining the site. The more I use it, and the more familiar I am getting with the settings, the better it gets!
Context:
I have two sections in my Hugo site: posts and references. From the front matter dashboard, clicking create content pops up a question asking which folder to add the content to, what to title it, and then it auto creates the file based on a template.
It also slugifies the title and prepends the date for the filename.
For posts, I like the auto dating behavior. For references, I want to disable it.
Question
Is there a config setting to selectively enable/disable the auto-dating based on which folder is selected?
Obviously, the "workaround" is to create it and then manually delete the date portion of the filename (which takes 2 seconds), but just wondering if such a feature / configuration exists. I searched through the existing issues and discussions , but didn't find anything specifically related to the folder choice.
Thanks again!
### Discussed in https://github.com/estruyf/vscode-front-matter/discussions/452
<div type='discussions-op-text'>
<sup>Originally posted by **rshmhrj** November 6, 2022</sup>
Hi all!
First -- thanks for all the work on this awesome extension. I have found it extremely useful in setting up and maintaining the site. The more I use it, and the more familiar I am getting with the settings, the better it gets!
### Context:
I have two sections in my Hugo site: `posts` and `references`. From the front matter dashboard, clicking `create content` pops up a question asking which folder to add the content to, what to title it, and then it auto creates the file based on a template.
**It also slugifies the title and prepends the date for the filename.**
For `posts`, I like the auto dating behavior. For `references`, I want to disable it.
### Question
**Is there a config setting to selectively enable/disable the auto-dating based on which folder is selected?**
Obviously, the "workaround" is to create it and then manually delete the date portion of the filename (which takes 2 seconds), but just wondering if such a feature / configuration exists. I searched through the existing issues and [discussions](https://github.com/estruyf/vscode-front-matter/discussions/252) , but didn't find anything specifically related to the folder choice.
Thanks again!</div>
<!-- github-sync-id:1439689112 -->
This is now available in the beta for you to try out by setting the `filePrefix` on the folder setting.
```json
"frontMatter.content.pageFolders": [
{
"title": "blog",
"path": "[[workspace]]/blog",
"filePrefix": "yyyy-MM-dd"
},
{
"title": "docs",
"path": "[[workspace]]/docs",
"filePrefix": ""
}
]
```
<!-- github-comment-id:1308717541 -->
Thanks for working on this @estruyf -- really appreciate the quick turnaround! Tested it out and it seems to work perfectly.
Testing steps:
- Used `vscodium` not `vs-code`
- Uninstalled FM and installed beta version.
- _Note: name in marketplace is `Front Matter CMS (BETA)` v8.2.3428349. I expected it to be `VS Code Marketplace - Front Matter BETA` per the [Readme](https://github.com/estruyf/vscode-front-matter/blob/main/README.md?plain=1#L119)_

- Starting `pageFolders` structure:
```json
"frontMatter.content.pageFolders": [
{
"title": "posts",
"path": "[[workspace]]/content/posts"
},
{
"title": "refs",
"path": "[[workspace]]/content/refs"
}
],
```
- Result
- Created `test1` in both `posts` and `refs`
- Both files were autonamed to `2022-11-10-test1.md`
- Updated `pageFolders` structure:
```json
"frontMatter.content.pageFolders": [
{
"title": "posts",
"path": "[[workspace]]/content/posts",
"filePrefix": "yyyy-MM-dd"
},
{
"title": "refs",
"path": "[[workspace]]/content/refs",
"filePrefix": ""
}
],
```
- Result
- Created `test2` in both `posts` and `refs`
- File in `posts` was named `2022-11-10-test2.md`
- File in `refs` was named `test2.md`
/lgtm
<!-- github-comment-id:1311269971 -->
@estruyf the only minor issue I'm seeing with it is the squiggly line, and the message about filePrefix not being allowed here:
@estruyf the only minor issue I'm seeing with it is the squiggly line, and the message about `filePrefix` not being allowed here:

<!-- github-comment-id:1311350378 -->
@rshmhrj no worries, this is because both beta and main schema have not been updated. That is the reason why you experience this. More important is that the functionality is working as expected.
@rshmhrj no worries, this is because both beta and main schema have not been updated. That is the reason why you experience this. More important is that the functionality is working as expected.
<!-- github-comment-id:1312566155 -->
Hi @estruyf,
Played around with it some more and found that if I set frontMatter.taxonomy.contentTypes[0].pageBundle = true
simultaneously with frontMatter.content.pageFolders[0].filePrefix = yyyy-MM-dd
the result is a pageBundle without the date prefix
flipping frontMatter.taxonomy.contentTypes[0].pageBundle = false
results in the standalone .md file with the date prefix.
Hi @estruyf,
Played around with it some more and found that if I set
`frontMatter.taxonomy.contentTypes[0].pageBundle` = `true`
simultaneously with
`frontMatter.content.pageFolders[0].filePrefix` = `yyyy-MM-dd`
the result is a pageBundle without the date prefix
flipping `frontMatter.taxonomy.contentTypes[0].pageBundle` = `false`
results in the standalone `.md` file with the date prefix.
<!-- github-comment-id:1312686040 -->
@dennisl68-castra we should also support having it on a content-type level, so that it is up to the user to decide. Like with the preview URL option, these can be defined globally, folder, and content-type level.
@dennisl68-castra we should also support having it on a content-type level, so that it is up to the user to decide. Like with the preview URL option, these can be defined globally, folder, and content-type level.
<!-- github-comment-id:1335260587 -->
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.
Discussed in https://github.com/estruyf/vscode-front-matter/discussions/452
Originally posted by rshmhrj November 6, 2022
Hi all!
First -- thanks for all the work on this awesome extension. I have found it extremely useful in setting up and maintaining the site. The more I use it, and the more familiar I am getting with the settings, the better it gets!
Context:
I have two sections in my Hugo site:
postsandreferences. From the front matter dashboard, clickingcreate contentpops up a question asking which folder to add the content to, what to title it, and then it auto creates the file based on a template.It also slugifies the title and prepends the date for the filename.
For
posts, I like the auto dating behavior. Forreferences, I want to disable it.Question
Is there a config setting to selectively enable/disable the auto-dating based on which folder is selected?
Obviously, the "workaround" is to create it and then manually delete the date portion of the filename (which takes 2 seconds), but just wondering if such a feature / configuration exists. I searched through the existing issues and discussions , but didn't find anything specifically related to the folder choice.
Thanks again!
This is now available in the beta for you to try out by setting the
filePrefixon the folder setting.Thanks for working on this @estruyf -- really appreciate the quick turnaround! Tested it out and it seems to work perfectly.
Testing steps:
Used
vscodiumnotvs-codeUninstalled FM and installed beta version.
Front Matter CMS (BETA)v8.2.3428349. I expected it to beVS Code Marketplace - Front Matter BETAper the ReadmeStarting
pageFoldersstructure:Result
test1in bothpostsandrefs2022-11-10-test1.mdUpdated
pageFoldersstructure:Result
test2in bothpostsandrefspostswas named2022-11-10-test2.mdrefswas namedtest2.md/lgtm
@estruyf the only minor issue I'm seeing with it is the squiggly line, and the message about

filePrefixnot being allowed here:@rshmhrj no worries, this is because both beta and main schema have not been updated. That is the reason why you experience this. More important is that the functionality is working as expected.
Hi @estruyf,
Played around with it some more and found that if I set
frontMatter.taxonomy.contentTypes[0].pageBundle=truesimultaneously with
frontMatter.content.pageFolders[0].filePrefix=yyyy-MM-ddthe result is a pageBundle without the date prefix
flipping
frontMatter.taxonomy.contentTypes[0].pageBundle=falseresults in the standalone
.mdfile with the date prefix.Thanks @rshmhrj, this functionality was indeed not yet implemented. It should have been fixed.
Yes! Tested it and it works with the bundle and with/without dates as expected!
Thanks so much @estruyf !! 😄
Thank you @rshmhrj for testing it out and providing the feedback!
Shouldn't such a setting be ContentType specific rather than folder specific?
@dennisl68-castra we should also support having it on a content-type level, so that it is up to the user to decide. Like with the preview URL option, these can be defined globally, folder, and content-type level.