Skip to content

Commit 9888aba

Browse files

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

README.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
This plugin will add link on headers for your markdown.
22

3-
To install, run `npm install gatsby-remark-link-on-headers gatsby-transformer-remark`.
3+
To install, run `npm install gatsby-remark-link-on-headers gatsby-transformer-remark`. This plugin requires gatsby-transformer-remark.
44

55
in gatsby-config, add this under `gatsby-transformer-remark`:
66

77
```js
88
plugins: [{
9-
//other plugins...
9+
//other plugins...
1010

11-
resolve: `gatsby-transformer-remark`,
12-
options: {
13-
plugins: [
14-
{
15-
resolve: `gatsby-remark-link-on-headers`,
16-
options: {
17-
headings: [`h2`, `h3`],
18-
},
19-
},
20-
]
21-
}
11+
resolve: `gatsby-transformer-remark`,
12+
options: {
13+
plugins: [
14+
{
15+
resolve: `gatsby-remark-link-on-headers`,
16+
options: {
17+
headings: [`h2`, `h3`],
18+
},
19+
},
20+
]
21+
}
2222
}]
23-
```
23+
```
24+
options: the array of headings you wanted to add link. For the example above, it will create link for h2 and h3 only. For all headings, leave it empty.

0 commit comments

Comments
 (0)