Docusaurus plugin to utilize
medium-zoom
in your projects easily!
npm install docusaurus-plugin-image-zoom
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: {}
}
},