update README example

This commit is contained in:
sup39 2022-11-05 21:49:19 +09:00
parent e3f0b7dbf5
commit 272a60b66f

View file

@ -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({