From 272a60b66fa775864316cd2f4cd805e6ba9113b3 Mon Sep 17 00:00:00 2001 From: sup39 Date: Sat, 5 Nov 2022 21:49:19 +0900 Subject: [PATCH] update README example --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6ee2fea..cdda626 100644 --- a/README.md +++ b/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({