MDX: Rename configuration options

This commit is contained in:
SonMooSans
2023-12-08 21:02:43 +08:00
parent 983ede8d19
commit 2ff7581422
2 changed files with 18 additions and 4 deletions
+12
View File
@@ -0,0 +1,12 @@
---
'next-docs-mdx': major
---
**Rename configuration options**
The options of `createNextDocs` is now renamed to be more flexible and straightforward.
`dataExports` -> `mdxOptions.valueToExport`
`pluginOptions` -> `mdxOptions.rehypeNextDocsOptions`
`rehypePlugins` and `remarkPlugins` can also be a function that accepts and returns plugins.
+6 -4
View File
@@ -46,16 +46,18 @@ import 'katex/dist/katex.css'
Type some TeX expression in your documents
```mdx
$c = \pm\sqrt{a^2 + b^2}$
c = \pm\sqrt{a^2 + b^2}
```
$c = \pm\sqrt{a^2 + b^2}$
```math
c = \pm\sqrt{a^2 + b^2}
```
---
**Long equations example**
$$
```math
\begin{align}
a^\dagger_1 &= \frac{X - iY}
{2} \otimes I \otimes I \otimes ... \otimes I \\ a^\dagger_2 &= Z \otimes \frac
@@ -64,4 +66,4 @@ a^\dagger_1 &= \frac{X - iY}
Z \otimes ... \otimes \frac{X - iY}
{2}
\end{align}
$$
```