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
Copy file name to clipboardExpand all lines: docs/pages/plugins/remark/options.mdx
+30-8
Original file line number
Diff line number
Diff line change
@@ -4,22 +4,19 @@ import { Callout } from "nextra/components";
4
4
5
5
## --remarkPlugins
6
6
7
-
<Calloutemoji="💡">An array of remark plugin names.</Callout>
7
+
<Calloutemoji="💡">An array of remark plugin names to be executed.</Callout>
8
8
9
9
> Accepts an Array.
10
10
11
-
You can provide any compatible [remark plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md) or you can write your own and reference locally.
11
+
You can include any compatible [remark plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md) or create and reference your own locally.
12
12
13
-
Each required plugin should be individually installed.
13
+
Each plugin you wish to use must be installed individually.
14
14
15
-
Options can be passed either as an array of strings or an array of string / options.
16
-
17
-
Please note that `remark-frontmatter`, `remark-gfm`, and `remark-mdx` are always included by default.
15
+
Options can be provided as either an array of strings or an array of strings with associated options.
18
16
19
17
```json filename="typedoc.json"
20
18
{
21
19
"remarkPlugins": [
22
-
"unified-prettier",
23
20
"remark-github",
24
21
[
25
22
"remark-toc",
@@ -31,13 +28,38 @@ Please note that `remark-frontmatter`, `remark-gfm`, and `remark-mdx` are always
31
28
}
32
29
```
33
30
31
+
## --defaultRemarkPlugins
32
+
33
+
<Calloutemoji="💡">
34
+
A set of flags that control the enabling or disabling of remark plugins that
35
+
are loaded by default.
36
+
</Callout>
37
+
38
+
>
39
+
40
+
By default, the plugins [`remark-gfm`](https://github.com/remarkjs/remark-gfm), [`remark-frontmatter`](https://github.com/remarkjs/remark-frontmatter), and [`remark-mdx`](https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx) are included, as these are considered the most common use cases.
41
+
42
+
However, these plugins modify the default parsing behavior of remark, which may not be ideal for all scenarios.
43
+
44
+
If you'd like to disable any of these default plugins, simply set the corresponding flag to `false`.
45
+
46
+
```json filename="typedoc.json"
47
+
{
48
+
"defaultRemarkPlugins": {
49
+
"gfm": true,
50
+
"frontmatter": true,
51
+
"mdx": true
52
+
}
53
+
}
54
+
```
55
+
34
56
## --remarkStringifyOptions
35
57
36
58
<Calloutemoji="💡">Custom options for the remark-stringify plugin.</Callout>
37
59
38
60
> Accepts a key/value object.
39
61
40
-
Under the hood, the `remark-stringify` plugin is used to serialize the markdown into final output.
62
+
Under the hood, the [`remark-stringify`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify) plugin is used to serialize the markdown into final output.
41
63
42
64
You can pass in options to the `remark-stringify` plugin using this option.
0 commit comments