Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 328 Bytes

parse-metadata.md

File metadata and controls

23 lines (19 loc) · 328 Bytes
title
parse-metadata.ts

This function reads the content in the metadata section of your Markdown document and returns Record<string, string>

---
title: Example
value: Foo Bar
author: John Appleseed
---

is parsed to be

{
  title: "Example"
  value: "Foo Bar"
  author: "John Appleseed"
}