@docusaurus/theme-classic 0.0.0-5507 → 0.0.0-5511

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.
@@ -54,15 +54,18 @@ function CardCategory({item}) {
54
54
  href={href}
55
55
  icon="🗃️"
56
56
  title={item.label}
57
- description={translate(
58
- {
59
- message: '{count} items',
60
- id: 'theme.docs.DocCard.categoryDescription',
61
- description:
62
- 'The default description for a category card in the generated index about how many items this category includes',
63
- },
64
- {count: item.items.length},
65
- )}
57
+ description={
58
+ item.description ??
59
+ translate(
60
+ {
61
+ message: '{count} items',
62
+ id: 'theme.docs.DocCard.categoryDescription',
63
+ description:
64
+ 'The default description for a category card in the generated index about how many items this category includes',
65
+ },
66
+ {count: item.items.length},
67
+ )
68
+ }
66
69
  />
67
70
  );
68
71
  }
@@ -74,7 +77,7 @@ function CardLink({item}) {
74
77
  href={item.href}
75
78
  icon={icon}
76
79
  title={item.label}
77
- description={doc?.description}
80
+ description={item.description ?? doc?.description}
78
81
  />
79
82
  );
80
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-5507",
3
+ "version": "0.0.0-5511",
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-5507",
24
- "@docusaurus/mdx-loader": "0.0.0-5507",
25
- "@docusaurus/module-type-aliases": "0.0.0-5507",
26
- "@docusaurus/plugin-content-blog": "0.0.0-5507",
27
- "@docusaurus/plugin-content-docs": "0.0.0-5507",
28
- "@docusaurus/plugin-content-pages": "0.0.0-5507",
29
- "@docusaurus/theme-common": "0.0.0-5507",
30
- "@docusaurus/theme-translations": "0.0.0-5507",
31
- "@docusaurus/types": "0.0.0-5507",
32
- "@docusaurus/utils": "0.0.0-5507",
33
- "@docusaurus/utils-common": "0.0.0-5507",
34
- "@docusaurus/utils-validation": "0.0.0-5507",
23
+ "@docusaurus/core": "0.0.0-5511",
24
+ "@docusaurus/mdx-loader": "0.0.0-5511",
25
+ "@docusaurus/module-type-aliases": "0.0.0-5511",
26
+ "@docusaurus/plugin-content-blog": "0.0.0-5511",
27
+ "@docusaurus/plugin-content-docs": "0.0.0-5511",
28
+ "@docusaurus/plugin-content-pages": "0.0.0-5511",
29
+ "@docusaurus/theme-common": "0.0.0-5511",
30
+ "@docusaurus/theme-translations": "0.0.0-5511",
31
+ "@docusaurus/types": "0.0.0-5511",
32
+ "@docusaurus/utils": "0.0.0-5511",
33
+ "@docusaurus/utils-common": "0.0.0-5511",
34
+ "@docusaurus/utils-validation": "0.0.0-5511",
35
35
  "@mdx-js/react": "^1.6.22",
36
36
  "clsx": "^1.2.1",
37
37
  "copy-text-to-clipboard": "^3.0.1",
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=16.14"
64
64
  },
65
- "gitHead": "459082ed8148374cf9205deb0a799f6b517c4035"
65
+ "gitHead": "227252d6714939e3a793d70bcd2097b39f7b16cb"
66
66
  }
@@ -87,15 +87,18 @@ function CardCategory({
87
87
  href={href}
88
88
  icon="🗃️"
89
89
  title={item.label}
90
- description={translate(
91
- {
92
- message: '{count} items',
93
- id: 'theme.docs.DocCard.categoryDescription',
94
- description:
95
- 'The default description for a category card in the generated index about how many items this category includes',
96
- },
97
- {count: item.items.length},
98
- )}
90
+ description={
91
+ item.description ??
92
+ translate(
93
+ {
94
+ message: '{count} items',
95
+ id: 'theme.docs.DocCard.categoryDescription',
96
+ description:
97
+ 'The default description for a category card in the generated index about how many items this category includes',
98
+ },
99
+ {count: item.items.length},
100
+ )
101
+ }
99
102
  />
100
103
  );
101
104
  }
@@ -108,7 +111,7 @@ function CardLink({item}: {item: PropSidebarItemLink}): JSX.Element {
108
111
  href={item.href}
109
112
  icon={icon}
110
113
  title={item.label}
111
- description={doc?.description}
114
+ description={item.description ?? doc?.description}
112
115
  />
113
116
  );
114
117
  }