-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: define filename prefixes on folder level #458
Comments
This is now available in the beta for you to try out by setting the "frontMatter.content.pageFolders": [
{
"title": "blog",
"path": "[[workspace]]/blog",
"filePrefix": "yyyy-MM-dd"
},
{
"title": "docs",
"path": "[[workspace]]/docs",
"filePrefix": ""
}
] |
Thanks for working on this @estruyf -- really appreciate the quick turnaround! Tested it out and it seems to work perfectly. Testing steps:
/lgtm |
@estruyf the only minor issue I'm seeing with it is the squiggly line, and the message about |
@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, flipping |
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. |
Discussed in #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:
posts
andreferences
. From the front matter dashboard, clickingcreate 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. 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!
The text was updated successfully, but these errors were encountered: