question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement: define filename prefixes on folder level

See original GitHub issue

Discussed in https://github.com/estruyf/vscode-front-matter/discussions/452

<div type='discussions-op-text'>

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!</div>

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
estruyfcommented, Nov 9, 2022

This is now available in the beta for you to try out by setting the filePrefix on the folder setting.

"frontMatter.content.pageFolders": [
  {
    "title": "blog",
    "path": "[[workspace]]/blog",
    "filePrefix": "yyyy-MM-dd"
  },
  {
    "title": "docs",
    "path": "[[workspace]]/docs",
    "filePrefix": ""
  }
]
1reaction
rshmhrjcommented, Nov 14, 2022

Yes! Tested it and it works with the bundle and with/without dates as expected!

Thanks so much @estruyf !! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Filename prefix - HP Support Community - 4862863
I am setting up scan to network folders and setup has asked for a filename prefix. What is it and where do I...
Read more >
CRS AL Language Extension – File Management
This will give you much nicer filenames without prefixes. Tips: By default, the system is not going to prefix/suffix anything. You will have...
Read more >
Chapter 4. Organizing and Naming Files and Folders
Chapter 4. Organizing and Naming Files and Folders In this chapter and the next, I present strategies for organizing and storing your digital...
Read more >
Subfolders and names of rendered images | Maya 2018
Enter these options in the File Name Prefix field of the Render Settings: ... your rendered images are not saved to individual folders....
Read more >
Integrating Long Path Names in Windows Applications
Windows traditionally has a 260 character path limit which applies to both the folder + filename combination. The native Windows APIs can ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found