gatsby-remark-attr
v0.1.0
Published
Gatsby remark plugin for adding attribute in markdown
Downloads
820
Maintainers
Readme
gatsby-remark-attr
Add attributes to MarkdownRemark
using remark-attr.
Install
npm install --save gatsby-remark-attr
How to use
// In your gatsby-config.js
plugins: [
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
'gatsby-remark-attr'
],
},
},
]
// allowDangerousDOMEventHandlers option
plugins: [
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
{
resolve: "gatsby-remark-attr",
options: {
allowDangerousDOMEventHandlers: true
},
},
],
},
},
]
Images
// input
![alt](src){width=100 height=50}
// output
<img src="src" alt="alt" width="100" height="50">
Links
// input
[Gatsby](https://github.com/gatsbyjs/gatsby){rel="external"}
// output
<a href="https://github.com/gatsbyjs/gatsby" rel="external">Gatsby</a>