@docusaurus/theme-classic 0.0.0-5142 → 0.0.0-5143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/theme/Logo/index.js +7 -1
- package/package.json +14 -14
- package/src/theme/Logo/index.tsx +10 -1
package/lib/theme/Logo/index.js
CHANGED
|
@@ -23,12 +23,18 @@ export default function Logo(props) {
|
|
|
23
23
|
light: useBaseUrl(logo.src),
|
|
24
24
|
dark: useBaseUrl(logo.srcDark || logo.src),
|
|
25
25
|
};
|
|
26
|
+
// If visible title is shown, fallback alt text should be
|
|
27
|
+
// an empty string to mark the logo as decorative.
|
|
28
|
+
const fallbackAlt = navbarTitle ? '' : title;
|
|
29
|
+
// Use logo alt text if provided (including empty string),
|
|
30
|
+
// and provide a sensible fallback otherwise.
|
|
31
|
+
const alt = logo.alt ?? fallbackAlt;
|
|
26
32
|
const themedImage = (
|
|
27
33
|
<ThemedImage
|
|
28
34
|
sources={sources}
|
|
29
35
|
height={logo.height}
|
|
30
36
|
width={logo.width}
|
|
31
|
-
alt={
|
|
37
|
+
alt={alt}
|
|
32
38
|
/>
|
|
33
39
|
);
|
|
34
40
|
return (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5143",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "0.0.0-
|
|
24
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
25
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
28
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
30
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
31
|
-
"@docusaurus/types": "0.0.0-
|
|
32
|
-
"@docusaurus/utils": "0.0.0-
|
|
33
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
34
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
23
|
+
"@docusaurus/core": "0.0.0-5143",
|
|
24
|
+
"@docusaurus/mdx-loader": "0.0.0-5143",
|
|
25
|
+
"@docusaurus/module-type-aliases": "0.0.0-5143",
|
|
26
|
+
"@docusaurus/plugin-content-blog": "0.0.0-5143",
|
|
27
|
+
"@docusaurus/plugin-content-docs": "0.0.0-5143",
|
|
28
|
+
"@docusaurus/plugin-content-pages": "0.0.0-5143",
|
|
29
|
+
"@docusaurus/theme-common": "0.0.0-5143",
|
|
30
|
+
"@docusaurus/theme-translations": "0.0.0-5143",
|
|
31
|
+
"@docusaurus/types": "0.0.0-5143",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-5143",
|
|
33
|
+
"@docusaurus/utils-common": "0.0.0-5143",
|
|
34
|
+
"@docusaurus/utils-validation": "0.0.0-5143",
|
|
35
35
|
"@mdx-js/react": "^1.6.22",
|
|
36
36
|
"clsx": "^1.1.1",
|
|
37
37
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=16.14"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "bf3edad97a282dde2d811ea8a3bc336618af9848"
|
|
68
68
|
}
|
package/src/theme/Logo/index.tsx
CHANGED
|
@@ -27,12 +27,21 @@ export default function Logo(props: Props): JSX.Element {
|
|
|
27
27
|
light: useBaseUrl(logo.src),
|
|
28
28
|
dark: useBaseUrl(logo.srcDark || logo.src),
|
|
29
29
|
};
|
|
30
|
+
|
|
31
|
+
// If visible title is shown, fallback alt text should be
|
|
32
|
+
// an empty string to mark the logo as decorative.
|
|
33
|
+
const fallbackAlt = navbarTitle ? '' : title;
|
|
34
|
+
|
|
35
|
+
// Use logo alt text if provided (including empty string),
|
|
36
|
+
// and provide a sensible fallback otherwise.
|
|
37
|
+
const alt = logo.alt ?? fallbackAlt;
|
|
38
|
+
|
|
30
39
|
const themedImage = (
|
|
31
40
|
<ThemedImage
|
|
32
41
|
sources={sources}
|
|
33
42
|
height={logo.height}
|
|
34
43
|
width={logo.width}
|
|
35
|
-
alt={
|
|
44
|
+
alt={alt}
|
|
36
45
|
/>
|
|
37
46
|
);
|
|
38
47
|
|