markdown-preview-plus icon indicating copy to clipboard operation
markdown-preview-plus copied to clipboard

Support hiding YAML front matter

Open chrahunt opened this issue 10 years ago • 3 comments

When writing pages/posts for Jekyll, often it's necessary to set some metadata in a YAML front matter section preceding the page/post content. As an example:

image

which gets rendered in the preview panel as

image

If there was a toggleable option to hide leading sections when surrounded by --- it would make the preview panel a little prettier when using Atom/mpp for this purpose. Let me know what you think.

chrahunt avatar Apr 03 '16 21:04 chrahunt

You can use pandoc to generate the html from markdown, and it supports YAML blocks that it doesn't render in the preview pane. Give it a try, I havent seen a performance drop in my work or home computers.

Geotig avatar May 18 '16 16:05 Geotig

It works! Go to Settings > Packages Search for markdown-preview-plus Scroll down the settings until you find „Enable Pandoc Parser“ and check it. Voilá, now the front-matter is gone. Awesome 👍

mgerzabek avatar May 08 '18 17:05 mgerzabek

YAML front-matter support added to markdown-it parser in v4.3.0 via markdown-it-front-matter

lierdakil avatar Jul 20 '20 22:07 lierdakil