Skip to main content
.com
Skip to main content
Algolia
View plugin on GitHub
See starters using this

gatsby-remark-attr

npm version

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">
// input
[Gatsby](https://github.com/gatsbyjs/gatsby){rel="external"}

// output
<a href="https://github.com/gatsbyjs/gatsby" rel="external">Gatsby</a>

Options

Options


Docs
Tutorial
Plugins
Blog
Showcase