Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

razzle-plugin-mdx-front-matter

elis5MIT1.0.1

Use mdx with Front Matter Razzle

readme

Add support for Front-Matter on MDX files in Razzle

Usage

razzle.config.js

module.exports = {
  plugins: [
    'mdx', 'mdx-front-matter'
  ]
}

src/my-mdx-file.mdx

---
name: My Document Title
---

The rest of my MDX content file.

src/your-app.js


import MyComp, { frontMatter } from './my-mdx-file'

console.log('Front-Matter:', frontMatter)
// Front-Matter: {name: "My Document Title"}

Created by: Eli Sklar