gatsby-remark-behead

0.0.3 • Public • Published

gatsby-remark-behead

A plugin for gatsby-transformer-remark, wrapping remark-behead.

Used to alter markdown header levels when parsed through remark.

Currently only the depth option works consistently.

Usage

Just add it to list of gatsby-transformer-remark plugins:

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [`gatsby-remark-behead`],
    },
  },
]

Options

  • depth: Number. Default 1. Changes the heading level by the provided number.

Examples

Decrease all headers by one level (e.g. <h1> to <h2>):

{
    resolve: "gatsby-remark-behead",
    options: { depth: 1 },
}

Increase all headers by one level (e.g. <h2> to <h1>):

{
    resolve: "gatsby-remark-behead",
    options: { depth: -1 },
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    17
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    17
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i gatsby-remark-behead

Weekly Downloads

18

Version

0.0.3

License

MIT

Unpacked Size

1.93 kB

Total Files

3

Last publish

Collaborators

  • morsby