{"repo":"abhinav/goldmark-frontmatter","free":true,"listed":false,"github":"https://github.com/abhinav/goldmark-frontmatter","clone":"git clone https://github.com/abhinav/goldmark-frontmatter.git","description":"Adds support for YAML and TOML front matter to Markdown documents.","language":"Go","stars":33,"topics":["goldmark","markdown"],"license":"BSD-3-Clause","category":"productivity","readme_excerpt":"goldmark-frontmatter goldmark-frontmatter is an extension for the [goldmark] Markdown parser that adds support for parsing YAML and TOML front matter from Markdown documents. [goldmark]: http://github.com/yuin/goldmark Features - Parses YAML and TOML front matter out of the box - Allows defining your own front matter formats - Exposes front matter in via a types-safe API Comparison to goldmark-meta yuin/goldmark-meta is another extension for goldmark that provides support for frontmatter. Here's a quick comparison of the two extensions: Feature goldmark-frontmatter goldmark-meta ------------------------ -------------------- ------------- YAML support ( --- ) ✅ ✅ TOML support ( +++ ) ✅ ❌ Custom formats ✅ ❌ Decode map[string]any ✅ ✅ Decode type-safe structs ✅ ❌ Render as table ❌ ✅ Demo A web-based demonstration of the extension is available at . Installation Usage To use goldmark-frontmatter, import the frontmatter package. Then include the frontmatter.Extender in the list of extensions when constructing your [ goldmark.Markdown ]. [ goldmark.Markdown ]: https://pkg.go.dev/github.com/yuin/goldmark#Markdown By default, this won't have any effect except stripping the front matter from the document. See Accessing front matter on how to read it. Syntax Front matter starts with three or more instances of a delimiter, and must be the first line of the document. The supported delimiters are: - YAML: - For example: - TOML: + For example: The front matter block ends with the same number","default_branch":null,"files":null,"tree":[],"storefront":"/r/abhinav","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/abhinav/goldmark-frontmatter/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."}