gatsby-remark-attr

    0.1.0 • Public • Published

    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">

    Links

    // input
    [Gatsby](https://github.com/gatsbyjs/gatsby){rel="external"}
     
    // output
    <a href="https://github.com/gatsbyjs/gatsby" rel="external">Gatsby</a>

    Options

    Options

    Install

    npm i gatsby-remark-attr

    DownloadsWeekly Downloads

    277

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    1.91 kB

    Total Files

    3

    Last publish

    Collaborators

    • shooontan