Skip to content
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

Handle Metadata defined at the top of a md file #88

Open
travs opened this issue Mar 10, 2020 · 1 comment
Open

Handle Metadata defined at the top of a md file #88

travs opened this issue Mar 10, 2020 · 1 comment

Comments

@travs
Copy link
Collaborator

travs commented Mar 10, 2020

Right now the metadata is displayed literally, between two horizontal lines.
We could handle this with showdown, and either ignore it as output, or add metadata to the html.

var conv = new showdown.Converter({metadata: true});
var html = conv.makeHtml(someMd);
var metadata = conv.getMetadata(); // returns an object with the document metadata
@adriaandotcom
Copy link

I use https://github.com/dworthen/js-yaml-front-matter for that, works only with strings though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants