estruyf / vscode-front-matter

Front Matter is a CMS running straight in Visual Studio Code. Can be used with static site generators like Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...
https://frontmatter.codes
MIT License
1.93k stars 73 forks source link

Enhancement: Ability to create new data files for a folder #834

Open estruyf opened 1 month ago

estruyf commented 1 month ago

Add the functionality to create new data files for the data folders (frontMatter.data.folders).

Discussion on Discord: https://discord.com/channels/992409023607476224/992409556351189082/1266087192242028617

estruyf commented 1 month ago

In the 10.4 BETA you can give it a try.

I have added the following properties on the frontMatter.data.folders setting:

{
  "frontMatter.data.folders": [{
    "id": "data",
    "path": "[[workspace]]/data/authors",
    "singleEntry": true,
    "enableFileCreation": true,
    "fileType": "json",
    "schema": {
      ...
    }
  }]
}

Once configured, you'll see the following new experiences/elements.

image

image