Skip to content

Commit ca64ddb

Browse files
authored
feature: image zoom (#599)
* image zoom * update config
1 parent 1429cc4 commit ca64ddb

File tree

3 files changed

+78
-4
lines changed

3 files changed

+78
-4
lines changed

docusaurus.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ const config = {
104104
containerId: process.env.GOOGLE_TAG_MANAGER || 'GTM-ABCD123'
105105
},
106106
],
107+
[
108+
'docusaurus-plugin-image-zoom', {},
109+
],
107110
],
108111
organizationName: 'cloudposse',
109112
projectName: 'docs',
@@ -316,6 +319,16 @@ const config = {
316319
darkTheme: darkCodeTheme,
317320
additionalLanguages: ['hcl', 'bash', 'rego'],
318321
},
322+
zoom: {
323+
selector: '.markdown :not(em) > img',
324+
config: {
325+
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
326+
background: {
327+
light: 'rgb(255, 255, 255)',
328+
dark: 'rgb(50, 50, 50)'
329+
}
330+
}
331+
}
319332
}),
320333
};
321334

package-lock.json

Lines changed: 64 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@mdx-js/react": "^1.6.22",
2727
"asciinema-player": "^3.0.1",
2828
"clsx": "^1.2.1",
29+
"docusaurus-plugin-image-zoom": "^1.0.1",
2930
"docusaurus-plugin-sass": "^0.2.3",
3031
"prism-react-renderer": "^1.3.5",
3132
"react": "^17.0.2",

0 commit comments

Comments
 (0)