Skip to content

Commit

Permalink
feature: image zoom (#599)
Browse files Browse the repository at this point in the history
* image zoom

* update config
  • Loading branch information
Benbentwo authored Dec 1, 2023
1 parent 1429cc4 commit ca64ddb
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 4 deletions.
13 changes: 13 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ const config = {
containerId: process.env.GOOGLE_TAG_MANAGER || 'GTM-ABCD123'
},
],
[
'docusaurus-plugin-image-zoom', {},
],
],
organizationName: 'cloudposse',
projectName: 'docs',
Expand Down Expand Up @@ -316,6 +319,16 @@ const config = {
darkTheme: darkCodeTheme,
additionalLanguages: ['hcl', 'bash', 'rego'],
},
zoom: {
selector: '.markdown :not(em) > img',
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
}
}
}
}),
};

Expand Down
68 changes: 64 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@mdx-js/react": "^1.6.22",
"asciinema-player": "^3.0.1",
"clsx": "^1.2.1",
"docusaurus-plugin-image-zoom": "^1.0.1",
"docusaurus-plugin-sass": "^0.2.3",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
Expand Down

0 comments on commit ca64ddb

Please sign in to comment.