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
2.04k stars 83 forks source link

Enhancement: read and apply frontmatter kept in json files at directory level #828

Open simoncox opened 5 months ago

simoncox commented 5 months ago

Is your feature request related to a problem? Please describe. With 11ty we are able to create a json file at directory level and in that apply frontmatter data to all files in that directory. FM is not recognising these. For example when I apply the type front matter to a blog post in my blog folder

Describe the solution you'd like For FM to recognise there is a directory level json file with frontmatter in it and utilise it. Perhaps add that in a way that it is not editable on each post but is used in the Front Matter data (because changing it in a post would cause issues - do you change all of them or just this one - in which case that need to add it to the post front matter and then there woudl be clash - so info and FM front end use only - sorting and filtering etc.)

Describe alternatives you've considered Duplication of the frontmatter into the .md files which would mean going back through all files and adding it in FM - bit laborious!

Additional context 11ty is very flexible and I appreciate that FM can actually work with it! More details here: https://www.11ty.dev/docs/data-template-dir/

estruyf commented 4 months ago

Thanks, @simoncox, for suggesting this. I'll take a look at 11ty and its functionality to see how we can add support in FM.