Skip to content

Commit

Permalink
Mdx improve (jaredpalmer#712)
Browse files Browse the repository at this point in the history
* add peer dependency, ipdate install instruction

* update readme
  • Loading branch information
jeetiss authored and jaredpalmer committed Jul 27, 2018
1 parent e07830c commit bbab21a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ As of Razzle 2.0, you can add your plugins to modify your setup.
* [TypeScript](https://github.com/jaredpalmer/razzle/tree/master/packages/razzle-plugin-typescript)
* [Vue](https://github.com/jaredpalmer/razzle/tree/master/packages/razzle-plugin-vue)
* [Elm](https://github.com/jaredpalmer/razzle/tree/master/packages/razzle-plugin-elm)
* [MDX](https://github.com/jaredpalmer/razzle/tree/master/packages/razzle-plugin-mdx)
* [See All](https://www.npmjs.com/search?q=razzle-plugin)

#### Using Plugins
Expand Down
19 changes: 9 additions & 10 deletions packages/razzle-plugin-mdx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,41 @@ This package contains a plugin for using mdx with Razzle
## Usage in Razzle Projects

```
npm i razzle-plugin-mdx
npm i razzle-plugin-mdx @mdx-js/tag
```

or

```
yarn add razzle-plugin-mdx
yarn add razzle-plugin-mdx @mdx-js/tag
```


### Using the plugin with the default options

```js
// razzle.config.js

module.exports = {
plugins: ['mdx'],
plugins: ["mdx"]
};
```

### With custom options:

```js
// razzle.config.js
const images = require('remark-images')
const emoji = require('remark-emoji')
const images = require("remark-images");
const emoji = require("remark-emoji");

module.exports = {
plugins: [
{
name: 'mdx',
name: "mdx",
options: {
mdPlugins: [images, emoji]
},
},
],
}
}
]
};
```

Expand Down
3 changes: 3 additions & 0 deletions packages/razzle-plugin-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"devDependencies": {
"jest": "20.0.4",
"razzle": "^2.2.0"
},
"peerDependencies": {
"@mdx-js/tag": ">=0.14.1"
}
}

0 comments on commit bbab21a

Please sign in to comment.