云盘
志元云盘
备份云盘
Home
/
志元云盘
/
webdav
/
hexo
/
hexo-blog
/
node_modules
/
hexo-front-matter
File
OriginalPic
Thumbnails
CopyAllDownloadUrl
EditTime
Size
dist
2024-01-09 18:36:01
10.28 KB
package.json
2023-11-13 01:33:43
1.18 KB
README.md
2023-11-13 01:33:43
1.32 KB
# hexo-front-matter [](https://github.com/hexojs/hexo-front-matter/actions?query=workflow%3ATester) [](https://www.npmjs.com/package/hexo-front-matter) [](https://coveralls.io/r/hexojs/hexo-front-matter?branch=master) Front-matter parser. ## What is Front-matter? Front-matter allows you to specify data at the top of a file. Here are 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. ## API ### parse(str, [options]) Parses front-matter. ### stringify(obj, [options]) 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` ### split(str) Splits a YAML front-matter string. ### escape(str) Converts hard tabs to soft tabs. ## License MIT
2025-08-29 16:33:30 Friday 216.73.216.167 Runningtime:0.036s Mem:1.47 MB