npm.io
2.0.1 • Published 5 years ago

@fox-land/remark-title

Licence
MIT
Version
2.0.1
Deps
0
Size
4 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

remark-title

remark plugin to check and inject the title of a markdown as the first element.

Usage

Used as a plugin for remark like so:

import remark from "remark";
import remarkTitle from "remark-title";

remark().use(title, { title: "remark-title" }).processSync(readme);

This will add a title to your document specified by the title option if it does not already exist

For example, the following input markdown:

# Bogus Title

Hello World!

Would yield:

# remark-title

Hello World!

options.title

Required. A string for a specified title.

License

MIT. See LICENSE for details.