readthedocs / recommonmark

A markdown parser for docutils
https://recommonmark.readthedocs.io/
MIT License
340 stars 252 forks source link

Should have an option to ignore front matter #183

Closed sylvestre closed 2 years ago

sylvestre commented 5 years ago

When we have some md files also used for Jekyll, they come with a Front Matter. It would be great to be able to tell recommonmark to ignore the declaration as it is currently rendering.

Here is an example of a rendering without this option: image

sylvestre commented 5 years ago

See also: https://github.com/readthedocs/commonmark.py/issues/208

sylvestre commented 4 years ago

I have been able to workaround this issue by using https://github.com/eyeseast/python-frontmatter/ to extract the relevant info from the fm and rewrite the md file. See: https://hg.mozilla.org/mozilla-central/file/tip/tools/docs/moztreedocs/__init__.py#l127