Don't format YAML font matter in preview

Stephanie Daugherty 2 years ago • updated 2 years ago 0

When authoring for Jekyll and other static site generators, markdown documents are often proceeded with YAML Front Matter, containing metadata for the document.

This section starts at the beginning of the document with three hyphens on a line by itself, includes a block of YAML setting the document metadata, and then ends with three hyphens on a line by themselves.

This text isn't Markdown, so there's no need to render it at all, however, when it gets rendered, it's ugly, because things that aren't meant to be displayed at all are turned into large headings, and this is distracting.