update README example
This commit is contained in:
parent
e3f0b7dbf5
commit
272a60b66f
1 changed files with 9 additions and 7 deletions
16
README.md
16
README.md
|
@ -42,14 +42,16 @@ const withMDX = mdx({
|
|||
remarkPlugins: [
|
||||
remarkFrontmatter,
|
||||
// export all metadata into an object with name `meta`
|
||||
() => remarkMdxFrontmatter({name: 'meta'}),
|
||||
[remarkMdxFrontmatter, {name: 'meta'}],
|
||||
],
|
||||
rehypePlugins: [
|
||||
[ComponentWrapper, {
|
||||
name: 'MDXRoot',
|
||||
path: '@/MDXRoot',
|
||||
// pass the exported `meta` object to the wrapper component
|
||||
props: ['meta'],
|
||||
}],
|
||||
],
|
||||
rehypePlugins: [() => ComponentWrapper({
|
||||
name: 'MDXRoot',
|
||||
path: '@/MDXRoot',
|
||||
// pass the exported `meta` object to the wrapper component
|
||||
props: ['meta'],
|
||||
})],
|
||||
},
|
||||
});
|
||||
export default withMDX({
|
||||
|
|
Loading…
Reference in a new issue