Socket
Socket
Sign inDemoInstall

gatsby-remark-figure-caption

Package Overview
Dependencies
3
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gatsby-remark-figure-caption

transform markdown image to figure with caption element


Version published
Weekly downloads
446
increased by67.04%
Maintainers
1
Install size
1.95 MB
Created
Weekly downloads
 

Readme

Source

gatsby-remark-figure-caption

Package Version Build Status Code Coverage MIT licensed

transforms: ![image with description](path-to-image.jpg) into:

<figure>
  <img src="path-to-image.jpg">
  <figcaption>image with description</figcaption>
</figure>

Install

npm install --save gatsby-remark-figure-caption

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        {
          resolve: `gatsby-remark-figure-caption`,
          options: {figureClassName: 'md-figure'},
        },
      ],
    },
  },
]

Options

NameDefaultDescription
figureClassName''class for the wrapper figure element
imageClassName''class for the wrapped img element
captionClassName''class for the wrapped figcaption element

Disclaimers

only tested with gatsby v2, it may work on v1.

not really a good thing a11y-wise:

PRs welcome.

Keywords

FAQs

Last updated on 30 Sep 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc