Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dwwoelfel/backmatter

Markdown metadata for those times when frontmatter just won't do.
https://github.com/dwwoelfel/backmatter

Last synced: about 2 months ago
JSON representation

Markdown metadata for those times when frontmatter just won't do.

Awesome Lists containing this project

README

        

# backmatter

## Installation

```sh
yarn add backmatter
```

## Usage

```javascript
import {removeBackmatter, extractBackmatter} from 'backmatter';

const md = `# Hello world

\`\`\`backmatter
{"meta": "data"}
\`\`\`
`;

const backmatter = extractBackmatter(md);
// backmatter = {meta: "data"}
const removed = removeBackmatter(md);
// removed = "# Hello world\n\n"

```