@kdupress/plugin-medium-zoom (opens new window)

medium-zoom (opens new window) plugin

Install

yarn add -D @kdupress/plugin-medium-zoom
# OR npm install -D @kdupress/plugin-medium-zoom

Usage

Simple:

module.exports = {
  plugins: ['@kdupress/medium-zoom']
}

With options:

module.exports = {
  plugins: {
    '@kdupress/medium-zoom': {
      selector: 'img.zoom-custom-imgs',
      // medium-zoom options here
      // See: https://github.com/francoischalifour/medium-zoom#options
      options: {
        margin: 16
      }
    }
  }
}

Options

selector

  • Type: string
  • Default: .theme-default-content :not(a) > img

Note that .theme-default-content is the class name of <Content /> component in default theme.

options

  • Type: object
  • Default: undefined

Options (opens new window) for medium-zoom (opens new window).