This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shenyu-website.git
The following commit(s) were added to refs/heads/main by this push:
new 677eab8f70 New support Click to enlarge the picture to improve the
reading experience (#946)
677eab8f70 is described below
commit 677eab8f70cd561b906fce59503896034fd057de
Author: Kerwin Bryant <[email protected]>
AuthorDate: Thu Aug 10 17:43:22 2023 +0800
New support Click to enlarge the picture to improve the reading experience
(#946)
---
docusaurus.config.js | 12 ++++++++++++
package.json | 1 +
2 files changed, 13 insertions(+)
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 5c9f1ad355..3c98397e96 100755
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -117,6 +117,17 @@ module.exports = {
// Optional: see doc section below
contextualSearch: true,
},
+ imageZoom: {
+ // CSS selector to apply the plugin to, defaults to '.markdown img'
+ selector: '.markdown img',
+ // Optional medium-zoom options
+ // see: https://www.npmjs.com/package/medium-zoom#options
+ options: {
+ margin: 24,
+ background: 'rgba(255, 255, 255, 0.2)',
+ scrollOffset: 240,
+ },
+ },
},
presets: [
[
@@ -248,5 +259,6 @@ module.exports = {
blogSidebarCount: 0,
},
],
+ "plugin-image-zoom",
],
};
diff --git a/package.json b/package.json
index 15a1732aaf..0f4c3c07dd 100755
--- a/package.json
+++ b/package.json
@@ -26,6 +26,7 @@
"clsx": "^1.1.1",
"file-loader": "^6.2.0",
"n": "^9.0.0",
+ "plugin-image-zoom": "github:flexanalytics/plugin-image-zoom",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",