/docusaurus-plugin-image-zoom

Image Zoom Plugin for Docusaurus 2

Primary LanguageJavaScriptMIT LicenseMIT

docusaurus-plugin-image-zoom

Docusaurus plugin to utilize medium-zoom in your projects easily!

Install

npm install docusaurus-plugin-image-zoom

Usage

Add as a plugin to docusaurus.config.js, like this:

  plugins: [
    require.resolve('docusaurus-plugin-image-zoom')
  ],

Set the zoomSelector (optional, defaults to '.markdown img') in docusaurus.config.js, like this:

  themeConfig: {
    zoom: {
      selector: '.markdown :not(em) > img',
      background: {
        light: 'rgb(255, 255, 255)',
        dark: 'rgb(50, 50, 50)'
      },
      // options you can specify via https://github.com/francoischalifour/medium-zoom#usage
      config: {}
    }
  },