{"repo":"jonschlinkert/gray-matter","free":true,"listed":false,"github":"https://github.com/jonschlinkert/gray-matter","clone":"git clone https://github.com/jonschlinkert/gray-matter.git","description":"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","language":"JavaScript","stars":4486,"topics":["yaml","front-matter","matter","javascript","parse","markdown","data","gatsby","assemble","phenomic"],"license":"MIT","category":"productivity","readme_excerpt":"gray-matter Parse front-matter from a string or file. Fast, reliable and easy to use. Parses YAML front matter by default, but also has support for YAML, JSON, TOML or Coffee Front-Matter, with options to set custom delimiters. Used by metalsmith, assemble, verb and many other projects. Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support. Install Install with npm: Heads up! Please see the changelog to learn about breaking changes that were made in v3.0. Sponsors Thanks to the following companies, organizations, and individuals for supporting the ongoing maintenance and development of gray-matter! Become a Sponsor to add your logo to this README, or any of my other projects What does this do? Run this example Add the HTML in the following example to example.html , then add the following code to example.js and run $ node example (without the $ ): Converts a string with front-matter, like this: Into an object like this: Why use gray-matter? simple : main function takes a string and returns an object accurate : better at catching and handling edge cases than front-matter parsers that rely on regex for parsing fast : faster than other front-matter parsers that use regex for parsing flexible : By default, gray-matter is capable of parsing YAML, JSON and JavaScript front-matter. But other engines may be added. extensible : Use custom delimiters, or add support for any language, like TOML, CoffeeScript, o","default_branch":null,"files":null,"tree":[],"storefront":"/r/jonschlinkert","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jonschlinkert/gray-matter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}