Skip to content

Commit 3404a53

Browse files
authored
feat(docs) add docusaurus-plugin-image-zoom (autobrr#227)
1 parent 3d85d5e commit 3404a53

File tree

3 files changed

+3065
-1820
lines changed

3 files changed

+3065
-1820
lines changed

docusaurus.config.js

+26-10
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,18 @@ const config = {
4242
blogTitle: "Release Notes",
4343
routeBasePath: "/release-notes",
4444
blogSidebarTitle: "Release Notes",
45-
blogSidebarCount: 'ALL',
45+
blogSidebarCount: "ALL",
4646
},
4747
docs: {
4848
sidebarPath: require.resolve("./sidebars.js"),
49-
// Please change this to your repo.
5049
editUrl: "https://github.com/autobrr/autobrr.com/tree/main/",
51-
//sidebarCollapsible: false,
5250
routeBasePath: "/",
5351
showLastUpdateTime: false,
5452
includeCurrentVersion: true,
5553
lastVersion: "current",
5654
versions: {
5755
current: {
58-
label: "Latest", // latest will always be the content of /docs
56+
label: "Latest",
5957
path: "",
6058
banner: "none",
6159
badge: true,
@@ -115,8 +113,7 @@ const config = {
115113
position: "left",
116114
},
117115
//{
118-
//{
119-
// type: "docsVersionDropdown", // disabling until its of use
116+
// type: "docsVersionDropdown", // Reserved for future versioned documentation
120117
// position: "left",
121118
// dropdownActiveClassDisabled: false,
122119
//},
@@ -139,13 +136,32 @@ const config = {
139136
],
140137
},
141138
colorMode: {
142-
//defaultMode: "dark",
143-
respectPrefersColorScheme: true
139+
//defaultMode: "dark",
140+
respectPrefersColorScheme: true,
144141
},
145142
prism: {
146143
theme: themes.vsLight,
147144
darkTheme: themes.oceanicNext,
148-
additionalLanguages: ["systemd", "nginx", "toml", "docker", "bash", "json"],
145+
additionalLanguages: [
146+
"systemd",
147+
"nginx",
148+
"toml",
149+
"docker",
150+
"bash",
151+
"json",
152+
],
153+
},
154+
zoom: {
155+
selector: ".markdown img",
156+
background: {
157+
light: "rgba(255, 255, 255, 0.8)",
158+
dark: "rgba(50, 50, 50, 0.8)",
159+
},
160+
config: {
161+
margin: 24,
162+
background: "#0D1117E6",
163+
scrollOffset: 0,
164+
},
149165
},
150166
},
151167

@@ -158,7 +174,7 @@ const config = {
158174
},
159175
};
160176
},
161-
// ...
177+
"docusaurus-plugin-image-zoom",
162178
],
163179
};
164180

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
"write-heading-ids": "docusaurus write-heading-ids"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "^3.5.2",
19-
"@docusaurus/preset-classic": "^3.5.2",
20-
"@docusaurus/theme-common": "^3.5.2",
21-
"@docusaurus/types": "^3.5.2",
22-
"@docusaurus/utils": "^3.5.2",
18+
"@docusaurus/core": "^3.6.2",
19+
"@docusaurus/preset-classic": "^3.6.2",
20+
"@docusaurus/theme-common": "^3.6.2",
21+
"@docusaurus/types": "^3.6.2",
22+
"@docusaurus/utils": "^3.6.2",
2323
"@easyops-cn/docusaurus-search-local": "^0.45.0",
2424
"@mdx-js/react": "^3.1.0",
2525
"clsx": "^2.1.1",
26+
"docusaurus-plugin-image-zoom": "^2.0.0",
2627
"prism-react-renderer": "^2.4.0",
2728
"react": "^18.3.1",
2829
"react-dom": "^18.3.1",

0 commit comments

Comments
 (0)