Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author: https://github.com/jonschlinkert
---
Time: 2001-11-23 15:01:42 -5
User: ed
Warning:
This is an error message
for the log file
---
Time: 2001-11-23 15:02:31 -5
User: ed
Warning:
A slightly different error
message.
---
Date: 2001-11-23 15:03:17 -5
User: ed
Fatal:
Unknown variable "bar"
Stack:
- file: TopClass.py
line: 23
code: |
x = MoreObject("345\n")
- file: MoreClass.py
line: 58
code: |-
foo = bar
I tried, but failed...
> var matter = require('gray-matter');
> matter('---\ntitle: Front Matter\n---\nThis is content.\n---\ndddsss');
{ orig: '---\ntitle: Front Matter\n---\nThis is content.\n---\ndddsss',
data: { title: 'Front Matter' },
content: 'This is content.\n---\ndddsss' }
like this:
I tried, but failed...
I want to save multiple part html,
and I don't want to write something like this: