@docusaurus/plugin-content-docs 0.0.0-4498 → 0.0.0-4509
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.
|
@@ -13,6 +13,6 @@ export declare type CategoryMetadataFile = {
|
|
|
13
13
|
collapsed?: boolean;
|
|
14
14
|
collapsible?: boolean;
|
|
15
15
|
className?: string;
|
|
16
|
-
link?: SidebarItemCategoryLinkConfig;
|
|
16
|
+
link?: SidebarItemCategoryLinkConfig | null;
|
|
17
17
|
};
|
|
18
18
|
export declare const DefaultSidebarItemsGenerator: SidebarItemsGenerator;
|
|
@@ -144,8 +144,8 @@ const DefaultSidebarItemsGenerator = async ({ numberPrefixParser, isCategoryInde
|
|
|
144
144
|
function getCategoryLinkedDocId() {
|
|
145
145
|
var _a, _b;
|
|
146
146
|
const link = categoryMetadata === null || categoryMetadata === void 0 ? void 0 : categoryMetadata.link;
|
|
147
|
-
if (link) {
|
|
148
|
-
if (link.type === 'doc') {
|
|
147
|
+
if (link !== undefined) {
|
|
148
|
+
if (link && link.type === 'doc') {
|
|
149
149
|
return ((_a = findDocByLocalId(link.id)) === null || _a === void 0 ? void 0 : _a.id) || getDoc(link.id).id;
|
|
150
150
|
}
|
|
151
151
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-docs",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4509",
|
|
4
4
|
"description": "Docs plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@docusaurus/core": "0.0.0-
|
|
26
|
-
"@docusaurus/logger": "0.0.0-
|
|
27
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
28
|
-
"@docusaurus/utils": "0.0.0-
|
|
29
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
25
|
+
"@docusaurus/core": "0.0.0-4509",
|
|
26
|
+
"@docusaurus/logger": "0.0.0-4509",
|
|
27
|
+
"@docusaurus/mdx-loader": "0.0.0-4509",
|
|
28
|
+
"@docusaurus/utils": "0.0.0-4509",
|
|
29
|
+
"@docusaurus/utils-validation": "0.0.0-4509",
|
|
30
30
|
"combine-promises": "^1.1.0",
|
|
31
31
|
"fs-extra": "^10.0.0",
|
|
32
32
|
"import-fresh": "^3.2.2",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"webpack": "^5.61.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
43
|
-
"@docusaurus/types": "0.0.0-
|
|
42
|
+
"@docusaurus/module-type-aliases": "0.0.0-4509",
|
|
43
|
+
"@docusaurus/types": "0.0.0-4509",
|
|
44
44
|
"@types/js-yaml": "^4.0.0",
|
|
45
45
|
"@types/picomatch": "^2.2.1",
|
|
46
46
|
"commander": "^5.1.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=14"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "0c42412f20deb81776aa94093571399b7edcb8e8"
|
|
59
59
|
}
|
|
@@ -45,7 +45,7 @@ export type CategoryMetadataFile = {
|
|
|
45
45
|
collapsed?: boolean;
|
|
46
46
|
collapsible?: boolean;
|
|
47
47
|
className?: string;
|
|
48
|
-
link?: SidebarItemCategoryLinkConfig;
|
|
48
|
+
link?: SidebarItemCategoryLinkConfig | null;
|
|
49
49
|
|
|
50
50
|
// TODO should we allow "items" here? how would this work? would an "autogenerated" type be allowed?
|
|
51
51
|
// This mkdocs plugin do something like that: https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin/
|
|
@@ -222,8 +222,8 @@ export const DefaultSidebarItemsGenerator: SidebarItemsGenerator = async ({
|
|
|
222
222
|
|
|
223
223
|
function getCategoryLinkedDocId(): string | undefined {
|
|
224
224
|
const link = categoryMetadata?.link;
|
|
225
|
-
if (link) {
|
|
226
|
-
if (link.type === 'doc') {
|
|
225
|
+
if (link !== undefined) {
|
|
226
|
+
if (link && link.type === 'doc') {
|
|
227
227
|
return findDocByLocalId(link.id)?.id || getDoc(link.id).id;
|
|
228
228
|
} else {
|
|
229
229
|
// We don't continue for other link types on purpose!
|