-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YAML formatter #177
Comments
Hello! No worries haha, I think this might turn into a cool addition to Vivify, so thanks for the idea! That said, I'm not entirely sure what you would like to see here. I'll make a proposal. What we could do is:
The idea behind this is that YAML is meant to be read by machines, not humans (hence (1) no displaying on the viewer) and that there are no common conventions for what the front matter contains/defines (hence (2) customized behavior). |
Hey @Praczet are you still interested in this? |
Sorry, Only, I would need some little help (or point when I can find the help) about this client-side.js how to start, where to put etc |
Okay nice! I'll get to work on this some time soon then and once it's merged I'll let you know how to use it :) |
**Why:** Some users add metadata to their Markdown files in the form of YAML-style front matter and it currently gets treated as regular content, which looks a bit odd when rendered on the page. Instead, we would like to be able to identify front matter and not render it to the page. Ideally we would like to make the metadata available and/or optionally render it to the page in some way, but this would require some reworking of the current setup. **What:** * Install `markdown-it-front-matter`[^1], which enables `markdown-it` to parse YAML-style front matter. * Enable `markdown-it-front-matter` via `MarkdownIt.use()` like we do with other plugins. * **Note:** This doesn’t actually do anything other than enable `markdown-it` to recognise front matter and not treat it as regular content. [^1]: https://github.com/ParkSB/markdown-it-front-matter --- jannis-baum#177
**Why:** Some users add metadata to their Markdown files in the form of YAML-style front matter and it currently gets treated as regular content, which looks a bit odd when rendered on the page. Instead, we would like to be able to identify front matter and not render it to the page. Ideally we would like to make the metadata available and/or optionally render it to the page in some way, but this would require some reworking of the current setup. **What:** * Install `markdown-it-front-matter`[^1], which enables `markdown-it` to parse YAML-style front matter. * Enable `markdown-it-front-matter` via `MarkdownIt.use()` like we do with other plugins. * **Note:** This doesn’t actually do anything other than enable `markdown-it` to recognise front matter and not treat it as regular content. [^1]: https://github.com/ParkSB/markdown-it-front-matter --- jannis-baum#177
feat(#177): enable understanding of front matter
Hi,
I feel like some ungrateful spammer, but here I am (sorry).
In the nutshell:
Would be possible to render
YAML Fromatter
differently or not at all?I don't know how to explain so lets go for examples. I am using quite often in my md files at the very top of file yaml formatter
For example:

This is rendered like this:

So the
YAML
part in this case is treated as `H1.But in this file:

it is rendered like this:

This case is a mess. It detects the list of tags and put every thing in it.
What I would like to have? Something like this:

And by default it could be folded:

/Best regards
Adam
The text was updated successfully, but these errors were encountered: