You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin will add link on headers for your markdown.
2
2
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.
4
4
5
5
in gatsby-config, add this under `gatsby-transformer-remark`:
6
6
7
7
```js
8
8
plugins: [{
9
-
//other plugins...
9
+
//other plugins...
10
10
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
+
}
22
22
}]
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