Skip to content

Issue: Stripping underscore in default filename #914

Description

@lamyseba

Describe the bug
When describing a content type in your frontmatter.json, you can specify a default file name, that will be used when creating content of this type. If you set a name with an underscore _ , the underscore will get stripped out of the name (the content file name will not have this underscore). This is annoying when using vscode-frontmatter with Hugo site generator, because _index.md is a filename that means something else as index.md for Hugo

To Reproduce
in your frontmatter.json, in a content type description :

{
  [...]
  "frontMatter.framework.id": "hugo",
  "frontMatter.taxonomy.contentTypes": [
    {
      "name": "default",
      "pageBundle": true,
      "defaultFileName": "_index",
      [...]
    }
  ]
}

Create a new content => The file name will be index.md, not _index.md

Expected behavior
The underscore should not be stripped, or there should be an option that ensure it is not stripped (eg. "cleanDefaultFilename" : false)

Device:

  • OS: Linux
  • Front Matter CMS Version [10.7.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    In BETAThe current task is available for testing in the BETA version.ReleasedThe task has been releasedbugSomething isn't workingv10.8.0Project: v10.8.0

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions