question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specify plugins options in mdPlugins array?

See original GitHub issue

Given a remark plugin, let’s say remark-emoji: how do I specify his options using the mdPlugins array.

Sorry if I’m missing something so obvious.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
johnocommented, Jul 27, 2018

This is now supported in 0.15.0-1 thanks to @revolunet.

Thanks for reporting @madiodio ❤️.

4reactions
madiodiocommented, Jul 27, 2018

No worries @johno, it’s kind of a edge case but in the meantime I’ve got to see the source and discover that this line mdx/packages/mdx/index.js#L59 actually allowed me to specify the plugin options like this

...
options: {
  mdPlugins: [images, emoji],
  padSpaceAfter: true // this is a `remark-emoji` option
}
...

This works but it would be awesome if there was a more elegant way to achieve that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Plugin Usage with Plugin Options | Gatsby
Plugins loaded into a Gatsby site can have options passed in to customize how a plugin operates. This guide refers to creating plugins,...
Read more >
Project Configuration - Docz
Specify an array of plugins that you want to use. mdPlugins. Type: Array; Default: []. Array of remark plugins to manipulate the MDXAST....
Read more >
PluginArray - Web APIs | MDN
Returns the Plugin with the specified name. Refreshes all plugins on the current page, optionally reloading documents.
Read more >
@mathieudutour/gatsby-mdx NPM | npm.io
To use .md or other file extensions, you can define an array of file extensions ... the option to set default layouts in...
Read more >
Blogging with Gatsby & MDX - React Training
Previously the plugin for gatsby-mdx was just a string in the array. That's fine unless you want to add options like we do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found