Skip to content

Commit 7c04e61

Browse files
committed
style: 🎨 Added zoom to images
Added zoom to images
1 parent 6a09fed commit 7c04e61

File tree

3 files changed

+9574
-13058
lines changed

3 files changed

+9574
-13058
lines changed

‎docusaurus.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const config = {
1515
organizationName: 'Exlint.io',
1616
projectName: 'Exlint Docs',
1717

18+
plugins: [require.resolve('docusaurus-plugin-image-zoom')],
19+
1820
presets: [
1921
[
2022
'@docusaurus/preset-classic',
@@ -115,14 +117,12 @@ const config = {
115117
container: 'div',
116118
},
117119
zoom: {
118-
selector: '.markdown img',
119-
config: {
120-
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
121-
background: {
122-
light: 'rgb(255, 255, 255)',
123-
dark: 'rgb(50, 50, 50)',
124-
},
120+
selector: '.markdown :not(em) > img',
121+
background: {
122+
light: 'rgb(255, 255, 255)',
123+
dark: 'rgb(50, 50, 50)',
125124
},
125+
config: {},
126126
},
127127
}),
128128
};

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@mdx-js/react": "1.6.22",
2424
"commitizen": "^4.2.4",
2525
"cz-vinyl": "^1.3.2",
26+
"docusaurus-plugin-image-zoom": "0.1.1",
2627
"prism-react-renderer": "^1.3.3",
2728
"react": "^17.0.2",
2829
"react-dom": "^17.0.2"

0 commit comments

Comments
 (0)