claylo / yaml-include

Valid, modular YAML documents with js-yaml. Seriously.
ISC License
39 stars 17 forks source link

Allow to include front-matter markdown files #17

Open stalniy opened 4 years ago

stalniy commented 4 years ago

Front matter is a special markdown format that eventually is parsed as a JSON or YAML (e.g., https://github.com/jxson/front-matter or https://www.npmjs.com/package/gray-matter). So, it would be cool to have an ability to specify function to use that parses including files, by default it can be yaml.load

What do you think?

claylo commented 5 months ago

Hey @stalniy, sorry about the incredibly slow response. Were you thinking this would then allow support for inclusion of Markdown files? I'm not sure what you're looking to accomplish with this feature.

I think I was confused when I initially read your request, and it was in the early days of the pandemic, and ... a lot has happened since then.

Please clarify the goal with this ... from the sound of what you're describing, it might be better as a Markdown processor feature?

stalniy commented 5 months ago

Hey,

I don't remember the actual purpose. I guess I wanted to use this for my static website. This is what front matter -> https://dpericich.medium.com/what-is-front-matter-and-how-is-it-used-to-create-dynamic-webpages-9d8dc053b457

Basically this is yaml file but written in more CMS friendly format, its content is separated from yaml config but this is still parsed into JSON object so can be included into yaml resulting object without issues: https://miro.medium.com/v2/resize:fit:1400/format:webp/1*qzY5XeszpqC13SFiqmJBHg.png