DavidAnson / vscode-markdownlint

Markdown linting and style checking for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
MIT License
930 stars 170 forks source link

Feature idea: frontmatter YAML Schema validation. #246

Closed JulianCataldo closed 2 years ago

JulianCataldo commented 2 years ago

Hello there, I use this extension and I love it,

I'm actually exploring YAML schemas and It's too bad that frontmatter in MD doesn't use it in VSCode.

I think it should not be that hard to implement it, and markdownlint could be a nice vehicle for this. I'm just not familiar with VS Code extensions and all the "Problems" emitting stuff.

Here is a proof-of-concept of manually splitted MD files, simulating frontmatter / md content body.

https://github.com/JulianCataldo/content-components

DavidAnson commented 2 years ago

As a linter for Markdown, validating front matter YAML against a schema feels like it's not really a core scenario. My worry would be where to define the schema and whether all the different blog engines have different expectations. It sounds like you have some experience and knowledge in this area and maybe you'd like to create an separate extension based on your work?

JulianCataldo commented 2 years ago

You're right, it's too far from the core function of this extension :) Linting and Schema validation are two completely different animals. Thanks for your response!