I like to use Atom as a relatively lightweight code editor. I also really like using static website generators like Jekyll, and writing in Markdown comes naturally to me. If you write a post on dev.to, you'll also see the same Markdown with YAML front matter. This short post should help you set up Atom for Markdown editing and previewing with support for the YAML front matter.
Prerequisites
Obviously you'll need Atom installed, but you also need to install pandoc.
Atom Packages
I tried a few different combinations of packages before finally getting the right ones. I believe the following is all you need to set up Atom for Markdown support:
- language-markdown - Markdown syntax support
- markdown-preview-plus - Preview Markdown with live updates
Configuration
There's not too much configuration needed, but the Jekyll front matter by default will not parse well with the default settings. In the setting for Markdown Preview Plus, do the following:
- Enable Pandoc parser
- Set Markdown flavor:
markdown-raw_tex+tex_math_single_backslash+yaml_metadata_block
The Markdown Preview Plus settings should then look something like this:
Let me know if I missed anything or if you have a better setup you'd like to share 😉
Top comments (0)