@docusaurus/plugin-content-docs 0.0.0-4357 → 0.0.0-4360
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/categoryGeneratedIndex.js +2 -0
- package/lib/routes.js +3 -1
- package/lib/sidebars/types.d.ts +4 -0
- package/lib/sidebars/validation.js +2 -0
- package/lib/types.d.ts +2 -0
- package/package.json +9 -9
- package/src/categoryGeneratedIndex.ts +2 -0
- package/src/plugin-content-docs.d.ts +2 -0
- package/src/routes.ts +13 -2
- package/src/sidebars/types.ts +4 -0
- package/src/sidebars/validation.ts +2 -0
- package/src/types.ts +2 -0
|
@@ -18,6 +18,8 @@ function getCategoryGeneratedIndexMetadata({ category, sidebarsUtils, docsById,
|
|
|
18
18
|
return {
|
|
19
19
|
title: (_a = category.link.title) !== null && _a !== void 0 ? _a : category.label,
|
|
20
20
|
description: category.link.description,
|
|
21
|
+
image: category.link.image,
|
|
22
|
+
keywords: category.link.keywords,
|
|
21
23
|
slug: category.link.slug,
|
|
22
24
|
permalink: category.link.permalink,
|
|
23
25
|
sidebar: sidebarName,
|
package/lib/routes.js
CHANGED
|
@@ -14,13 +14,15 @@ const logger_1 = (0, tslib_1.__importDefault)(require("@docusaurus/logger"));
|
|
|
14
14
|
async function createCategoryGeneratedIndexRoutes({ version, actions, docCategoryGeneratedIndexComponent, }) {
|
|
15
15
|
const slugs = (0, utils_1.createSlugger)();
|
|
16
16
|
async function createCategoryGeneratedIndexRoute(categoryGeneratedIndex) {
|
|
17
|
-
const { sidebar, title, description, slug, permalink, previous, next } = categoryGeneratedIndex;
|
|
17
|
+
const { sidebar, title, description, slug, permalink, previous, next, image, keywords, } = categoryGeneratedIndex;
|
|
18
18
|
const propFileName = slugs.slug(`${version.versionPath}-${categoryGeneratedIndex.sidebar}-category-${categoryGeneratedIndex.title}`);
|
|
19
19
|
const prop = {
|
|
20
20
|
title,
|
|
21
21
|
description,
|
|
22
22
|
slug,
|
|
23
23
|
permalink,
|
|
24
|
+
image,
|
|
25
|
+
keywords,
|
|
24
26
|
navigation: {
|
|
25
27
|
previous,
|
|
26
28
|
next,
|
package/lib/sidebars/types.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ export declare type SidebarItemCategoryLinkGeneratedIndexConfig = {
|
|
|
42
42
|
slug?: string;
|
|
43
43
|
title?: string;
|
|
44
44
|
description?: string;
|
|
45
|
+
image?: string;
|
|
46
|
+
keywords?: string | readonly string[];
|
|
45
47
|
};
|
|
46
48
|
export declare type SidebarItemCategoryLinkGeneratedIndex = {
|
|
47
49
|
type: 'generated-index';
|
|
@@ -49,6 +51,8 @@ export declare type SidebarItemCategoryLinkGeneratedIndex = {
|
|
|
49
51
|
permalink: string;
|
|
50
52
|
title?: string;
|
|
51
53
|
description?: string;
|
|
54
|
+
image?: string;
|
|
55
|
+
keywords?: string | readonly string[];
|
|
52
56
|
};
|
|
53
57
|
export declare type SidebarItemCategoryLinkConfig = SidebarItemCategoryLinkDoc | SidebarItemCategoryLinkGeneratedIndexConfig;
|
|
54
58
|
export declare type SidebarItemCategoryLink = SidebarItemCategoryLinkDoc | SidebarItemCategoryLinkGeneratedIndex;
|
|
@@ -50,6 +50,8 @@ const sidebarItemCategoryLinkSchema = utils_validation_1.Joi.object()
|
|
|
50
50
|
// permalink: Joi.string().optional(), // No, this one is not in the user config, only in the normalized version
|
|
51
51
|
title: utils_validation_1.Joi.string().optional(),
|
|
52
52
|
description: utils_validation_1.Joi.string().optional(),
|
|
53
|
+
image: utils_validation_1.Joi.string().optional(),
|
|
54
|
+
keywords: [utils_validation_1.Joi.string(), utils_validation_1.Joi.array().items(utils_validation_1.Joi.string())],
|
|
53
55
|
}),
|
|
54
56
|
},
|
|
55
57
|
{
|
package/lib/types.d.ts
CHANGED
|
@@ -144,6 +144,8 @@ export declare type CategoryGeneratedIndexMetadata = {
|
|
|
144
144
|
sidebar: string;
|
|
145
145
|
previous?: DocNavLink;
|
|
146
146
|
next?: DocNavLink;
|
|
147
|
+
image?: string;
|
|
148
|
+
keywords?: string | readonly string[];
|
|
147
149
|
};
|
|
148
150
|
export declare type SourceToPermalink = {
|
|
149
151
|
[source: string]: string;
|
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-4360",
|
|
4
4
|
"description": "Docs plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-docs.d.ts",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "0.0.0-
|
|
22
|
-
"@docusaurus/logger": "0.0.0-
|
|
23
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
24
|
-
"@docusaurus/utils": "0.0.0-
|
|
25
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
21
|
+
"@docusaurus/core": "0.0.0-4360",
|
|
22
|
+
"@docusaurus/logger": "0.0.0-4360",
|
|
23
|
+
"@docusaurus/mdx-loader": "0.0.0-4360",
|
|
24
|
+
"@docusaurus/utils": "0.0.0-4360",
|
|
25
|
+
"@docusaurus/utils-validation": "0.0.0-4360",
|
|
26
26
|
"combine-promises": "^1.1.0",
|
|
27
27
|
"escape-string-regexp": "^4.0.0",
|
|
28
28
|
"fs-extra": "^10.0.0",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"webpack": "^5.61.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
42
|
-
"@docusaurus/types": "0.0.0-
|
|
41
|
+
"@docusaurus/module-type-aliases": "0.0.0-4360",
|
|
42
|
+
"@docusaurus/types": "0.0.0-4360",
|
|
43
43
|
"@types/js-yaml": "^4.0.0",
|
|
44
44
|
"@types/picomatch": "^2.2.1",
|
|
45
45
|
"commander": "^5.1.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=14"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "92744da65a37c440a0d3077b217f4e0033b664ce"
|
|
57
57
|
}
|
|
@@ -28,6 +28,8 @@ function getCategoryGeneratedIndexMetadata({
|
|
|
28
28
|
return {
|
|
29
29
|
title: category.link.title ?? category.label,
|
|
30
30
|
description: category.link.description,
|
|
31
|
+
image: category.link.image,
|
|
32
|
+
keywords: category.link.keywords,
|
|
31
33
|
slug: category.link.slug,
|
|
32
34
|
permalink: category.link.permalink,
|
|
33
35
|
sidebar: sidebarName,
|
|
@@ -42,6 +42,8 @@ declare module '@docusaurus/plugin-content-docs' {
|
|
|
42
42
|
export type PropCategoryGeneratedIndex = {
|
|
43
43
|
title: string;
|
|
44
44
|
description?: string;
|
|
45
|
+
image?: string;
|
|
46
|
+
keywords?: string | readonly string[];
|
|
45
47
|
slug: string;
|
|
46
48
|
permalink: string;
|
|
47
49
|
navigation: PropNavigation;
|
package/src/routes.ts
CHANGED
|
@@ -30,8 +30,17 @@ export async function createCategoryGeneratedIndexRoutes({
|
|
|
30
30
|
async function createCategoryGeneratedIndexRoute(
|
|
31
31
|
categoryGeneratedIndex: CategoryGeneratedIndexMetadata,
|
|
32
32
|
): Promise<RouteConfig> {
|
|
33
|
-
const {
|
|
34
|
-
|
|
33
|
+
const {
|
|
34
|
+
sidebar,
|
|
35
|
+
title,
|
|
36
|
+
description,
|
|
37
|
+
slug,
|
|
38
|
+
permalink,
|
|
39
|
+
previous,
|
|
40
|
+
next,
|
|
41
|
+
image,
|
|
42
|
+
keywords,
|
|
43
|
+
} = categoryGeneratedIndex;
|
|
35
44
|
|
|
36
45
|
const propFileName = slugs.slug(
|
|
37
46
|
`${version.versionPath}-${categoryGeneratedIndex.sidebar}-category-${categoryGeneratedIndex.title}`,
|
|
@@ -42,6 +51,8 @@ export async function createCategoryGeneratedIndexRoutes({
|
|
|
42
51
|
description,
|
|
43
52
|
slug,
|
|
44
53
|
permalink,
|
|
54
|
+
image,
|
|
55
|
+
keywords,
|
|
45
56
|
navigation: {
|
|
46
57
|
previous,
|
|
47
58
|
next,
|
package/src/sidebars/types.ts
CHANGED
|
@@ -52,6 +52,8 @@ export type SidebarItemCategoryLinkGeneratedIndexConfig = {
|
|
|
52
52
|
slug?: string;
|
|
53
53
|
title?: string;
|
|
54
54
|
description?: string;
|
|
55
|
+
image?: string;
|
|
56
|
+
keywords?: string | readonly string[];
|
|
55
57
|
};
|
|
56
58
|
export type SidebarItemCategoryLinkGeneratedIndex = {
|
|
57
59
|
type: 'generated-index';
|
|
@@ -59,6 +61,8 @@ export type SidebarItemCategoryLinkGeneratedIndex = {
|
|
|
59
61
|
permalink: string;
|
|
60
62
|
title?: string;
|
|
61
63
|
description?: string;
|
|
64
|
+
image?: string;
|
|
65
|
+
keywords?: string | readonly string[];
|
|
62
66
|
};
|
|
63
67
|
|
|
64
68
|
export type SidebarItemCategoryLinkConfig =
|
|
@@ -70,6 +70,8 @@ const sidebarItemCategoryLinkSchema = Joi.object<SidebarItemCategoryLink>()
|
|
|
70
70
|
// permalink: Joi.string().optional(), // No, this one is not in the user config, only in the normalized version
|
|
71
71
|
title: Joi.string().optional(),
|
|
72
72
|
description: Joi.string().optional(),
|
|
73
|
+
image: Joi.string().optional(),
|
|
74
|
+
keywords: [Joi.string(), Joi.array().items(Joi.string())],
|
|
73
75
|
}),
|
|
74
76
|
},
|
|
75
77
|
{
|
package/src/types.ts
CHANGED