Skip to content

Commit 6458cd9

Browse files
document passing options to config markdown plugins
1 parent 15d593a commit 6458cd9

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

src/pages/docs/reference/configuration.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,33 @@ After installing the package, pass the plugin name as a string:
227227
228228
<!-- prettier-ignore-end -->
229229
230+
If you need to pass options to a markdown plugin, you can use object syntax with the plugin name and the options it takes.
231+
232+
<!-- prettier-ignore-start -->
233+
234+
<app-ctc-block variant="snippet">
235+
236+
```js
237+
export default {
238+
markdown: {
239+
plugins: [
240+
"rehype-slug",
241+
"remark-gfm",
242+
{
243+
name: "rehype-autolink-headings",
244+
options: {
245+
behavior: "append"
246+
},
247+
},
248+
],
249+
},
250+
};
251+
```
252+
253+
</app-ctc-block>
254+
255+
<!-- prettier-ignore-end -->
256+
230257
## Optimization
231258
232259
Greenwood provides a number of different ways to send hints to Greenwood as to how JavaScript and CSS tags in your HTML should get loaded by the browser. Greenwood supplements, and builds up on top of existing [resource "hints" like `preload` and `prefetch`](https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content).

0 commit comments

Comments
 (0)