1.0.1 • Published 6 years ago

razzle-plugin-mdx-front-matter v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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