Skip to content

Commit 7e0dc1b

Browse files
committed
implement zoom-in feature for images
1 parent 4f45a91 commit 7e0dc1b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docusaurus.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ const config = {
9191
containerId: "GTM-K3NQMDX",
9292
},
9393
],
94+
require.resolve("docusaurus-plugin-image-zoom")
9495
],
9596

9697
presets: [
@@ -308,7 +309,17 @@ const config = {
308309
// apiKey: "58f35480017be37aca9f762323a0b4d1", //staging
309310
// indexName: "UID2", //staging
310311
},
312+
zoom: {
313+
selector: '.markdown :not(em) > img',
314+
config: {
315+
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
316+
background: {
317+
light: 'rgb(255, 255, 255)',
318+
dark: 'rgb(50, 50, 50)'
319+
}
320+
}
321+
}
311322
}),
312-
};
323+
};
313324

314325
export default config;

0 commit comments

Comments
 (0)