Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morsby/gatsby-remark-behead
A plugin for gatsby-transformer-remark, wrapping remark-behead.
https://github.com/morsby/gatsby-remark-behead
Last synced: 23 days ago
JSON representation
A plugin for gatsby-transformer-remark, wrapping remark-behead.
- Host: GitHub
- URL: https://github.com/morsby/gatsby-remark-behead
- Owner: morsby
- Created: 2019-02-18T20:55:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-02-18T21:24:22.000Z (over 5 years ago)
- Last Synced: 2024-09-14T04:10:43.787Z (about 2 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-remark-behead
A plugin for [gatsby-transformer-remark](https://www.gatsbyjs.org/packages/gatsby-transformer-remark/), wrapping [remark-behead](https://github.com/mrzmmr/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. `
` to `
`):
```
{
resolve: "gatsby-remark-behead",
options: { depth: 1 },
}
```Increase all headers by one level (e.g. `
` to `
`):
```
{
resolve: "gatsby-remark-behead",
options: { depth: -1 },
}
```