We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cf04e25 + d78b8bd commit 609623dCopy full SHA for 609623d
lib/mdx.js
@@ -56,13 +56,11 @@ export async function getFileBySlug(type, slug) {
56
57
let toc = []
58
59
- // Parsing frontmatter here to pass it in as options to rehype plugin
60
- const { data: frontmatter } = matter(source)
61
- const { code } = await bundleMDX({
+ const { code, frontmatter } = await bundleMDX({
62
source,
63
// mdx imports can be automatically source from the components directory
64
cwd: path.join(root, 'components'),
65
- xdmOptions(options) {
+ xdmOptions(options, frontmatter) {
66
// this is the recommended way to add custom remark/rehype plugins:
67
// The syntax might look weird, but it protects you in case we add/remove
68
// plugins in the future.
0 commit comments