Front-matter parser.
Front-matter allows you to specify data at the top of a file. Here're two formats:
YAML front-matter
--- layout: false title: "Hello world" --- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
JSON front-matter
;;; "layout": false, "title": "Hello world" ;;; Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Prefixing separators are optional.
Parses front-matter.
Converts an object to a front-matter string.
Option | Description | Default |
---|---|---|
mode | The mode can be either json or yaml . | yaml |
separator | Separator | --- |
prefixSeparator | Add prefixing separator. | false |
Splits a YAML front-matter string.
Converts hard tabs to soft tabs.
MIT