docusaurus-theme-openapi-docs 1.0.2 → 1.0.3
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/ApiDemoPanel/MethodEndpoint/index.js +9 -6
- package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +7 -2
- package/lib/theme/ApiDemoPanel/index.js +3 -7
- package/lib/theme/ApiItem/index.js +2 -1
- package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +9 -6
- package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +6 -2
- package/lib-next/theme/ApiDemoPanel/index.js +2 -7
- package/lib-next/theme/ApiItem/index.js +2 -1
- package/package.json +6 -6
- package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +6 -4
- package/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx +7 -2
- package/src/theme/ApiDemoPanel/index.tsx +8 -7
- package/src/theme/ApiItem/index.tsx +9 -5
- package/src/types.ts +112 -0
|
@@ -24,18 +24,21 @@ function colorForMethod(method) {
|
|
|
24
24
|
case "get":
|
|
25
25
|
return "primary";
|
|
26
26
|
|
|
27
|
-
case "put":
|
|
28
|
-
return "warning";
|
|
29
|
-
|
|
30
|
-
case "patch":
|
|
31
|
-
return "warning";
|
|
32
|
-
|
|
33
27
|
case "post":
|
|
34
28
|
return "success";
|
|
35
29
|
|
|
36
30
|
case "delete":
|
|
37
31
|
return "danger";
|
|
38
32
|
|
|
33
|
+
case "put":
|
|
34
|
+
return "info";
|
|
35
|
+
|
|
36
|
+
case "patch":
|
|
37
|
+
return "warning";
|
|
38
|
+
|
|
39
|
+
case "head":
|
|
40
|
+
return "secondary";
|
|
41
|
+
|
|
39
42
|
default:
|
|
40
43
|
return undefined;
|
|
41
44
|
}
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _Link = _interopRequireDefault(require("@docusaurus/Link"));
|
|
11
|
+
|
|
10
12
|
var _hooks = require("../hooks");
|
|
11
13
|
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -17,9 +19,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
19
|
* This source code is licensed under the MIT license found in the
|
|
18
20
|
* LICENSE file in the root directory of this source tree.
|
|
19
21
|
* ========================================================================== */
|
|
20
|
-
function SecuritySchemes() {
|
|
22
|
+
function SecuritySchemes(props) {
|
|
21
23
|
const options = (0, _hooks.useTypedSelector)(state => state.auth.options);
|
|
22
24
|
const selected = (0, _hooks.useTypedSelector)(state => state.auth.selected);
|
|
25
|
+
const infoAuthPath = `/${props.infoPath}#authentication`;
|
|
23
26
|
if (selected === undefined) return null;
|
|
24
27
|
const selectedAuth = options[selected];
|
|
25
28
|
return <div style={{
|
|
@@ -32,7 +35,9 @@ function SecuritySchemes() {
|
|
|
32
35
|
|
|
33
36
|
if (isApiKey || isBearer) {
|
|
34
37
|
return <_react.default.Fragment key={selected}>
|
|
35
|
-
<b>
|
|
38
|
+
<b>
|
|
39
|
+
Authorization: <_Link.default to={infoAuthPath}>{auth.key}</_Link.default>
|
|
40
|
+
</b>
|
|
36
41
|
<pre style={{
|
|
37
42
|
display: "flex",
|
|
38
43
|
flexDirection: "column",
|
|
@@ -46,7 +46,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
* ========================================================================== */
|
|
48
48
|
function ApiDemoPanel({
|
|
49
|
-
item
|
|
49
|
+
item,
|
|
50
|
+
infoPath
|
|
50
51
|
}) {
|
|
51
52
|
var _item$responses, _item$requestBody$con, _item$requestBody, _item$servers, _item$parameters, _xCodeSamples;
|
|
52
53
|
|
|
@@ -110,19 +111,14 @@ function ApiDemoPanel({
|
|
|
110
111
|
return <_reactRedux.Provider store={store2}>
|
|
111
112
|
<div className={_stylesModule.default.apiDemoPanelContainer}>
|
|
112
113
|
<_MethodEndpoint.default method={method} path={path} />
|
|
113
|
-
|
|
114
|
-
<_SecuritySchemes.default />
|
|
115
|
-
|
|
114
|
+
<_SecuritySchemes.default infoPath={infoPath} />
|
|
116
115
|
<div className={_stylesModule.default.optionsPanel}>
|
|
117
116
|
<_ParamOptions.default />
|
|
118
117
|
<_Body.default jsonRequestBodyExample={item.jsonRequestBodyExample} requestBodyMetadata={item.requestBody} />
|
|
119
118
|
<_Accept.default />
|
|
120
119
|
</div>
|
|
121
|
-
|
|
122
120
|
<_Server.default />
|
|
123
|
-
|
|
124
121
|
<_Curl.default postman={postman} codeSamples={(_xCodeSamples = item["x-code-samples"]) !== null && _xCodeSamples !== void 0 ? _xCodeSamples : []} />
|
|
125
|
-
|
|
126
122
|
<_Response.default />
|
|
127
123
|
</div>
|
|
128
124
|
</_reactRedux.Provider>;
|
|
@@ -85,6 +85,7 @@ function DocItemContent(props) {
|
|
|
85
85
|
frontMatter
|
|
86
86
|
} = DocContent;
|
|
87
87
|
const {
|
|
88
|
+
info_path: infoPath,
|
|
88
89
|
hide_title: hideTitle,
|
|
89
90
|
hide_table_of_contents: hideTableOfContents,
|
|
90
91
|
toc_min_heading_level: tocMinHeadingLevel,
|
|
@@ -131,7 +132,7 @@ function DocItemContent(props) {
|
|
|
131
132
|
<DocContent />
|
|
132
133
|
</div>
|
|
133
134
|
{api && <div className="col col--5">
|
|
134
|
-
<ApiDemoPanel item={api} />
|
|
135
|
+
<ApiDemoPanel item={api} infoPath={infoPath} />
|
|
135
136
|
</div>}
|
|
136
137
|
</div>
|
|
137
138
|
</_MDXContent.default>
|
|
@@ -14,18 +14,21 @@ function colorForMethod(method) {
|
|
|
14
14
|
case "get":
|
|
15
15
|
return "primary";
|
|
16
16
|
|
|
17
|
-
case "put":
|
|
18
|
-
return "warning";
|
|
19
|
-
|
|
20
|
-
case "patch":
|
|
21
|
-
return "warning";
|
|
22
|
-
|
|
23
17
|
case "post":
|
|
24
18
|
return "success";
|
|
25
19
|
|
|
26
20
|
case "delete":
|
|
27
21
|
return "danger";
|
|
28
22
|
|
|
23
|
+
case "put":
|
|
24
|
+
return "info";
|
|
25
|
+
|
|
26
|
+
case "patch":
|
|
27
|
+
return "warning";
|
|
28
|
+
|
|
29
|
+
case "head":
|
|
30
|
+
return "secondary";
|
|
31
|
+
|
|
29
32
|
default:
|
|
30
33
|
return undefined;
|
|
31
34
|
}
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
import React from "react";
|
|
8
|
+
import Link from "@docusaurus/Link";
|
|
8
9
|
import { useTypedSelector } from "../hooks";
|
|
9
10
|
|
|
10
|
-
function SecuritySchemes() {
|
|
11
|
+
function SecuritySchemes(props) {
|
|
11
12
|
const options = useTypedSelector((state) => state.auth.options);
|
|
12
13
|
const selected = useTypedSelector((state) => state.auth.selected);
|
|
14
|
+
const infoAuthPath = `/${props.infoPath}#authentication`;
|
|
13
15
|
if (selected === undefined) return null;
|
|
14
16
|
const selectedAuth = options[selected];
|
|
15
17
|
return (
|
|
@@ -27,7 +29,9 @@ function SecuritySchemes() {
|
|
|
27
29
|
if (isApiKey || isBearer) {
|
|
28
30
|
return (
|
|
29
31
|
<React.Fragment key={selected}>
|
|
30
|
-
<b>
|
|
32
|
+
<b>
|
|
33
|
+
Authorization: <Link to={infoAuthPath}>{auth.key}</Link>
|
|
34
|
+
</b>
|
|
31
35
|
<pre
|
|
32
36
|
style={{
|
|
33
37
|
display: "flex",
|
|
@@ -21,7 +21,7 @@ import Server from "./Server";
|
|
|
21
21
|
import { createStoreWithState } from "./store";
|
|
22
22
|
import styles from "./styles.module.css";
|
|
23
23
|
|
|
24
|
-
function ApiDemoPanel({ item }) {
|
|
24
|
+
function ApiDemoPanel({ item, infoPath }) {
|
|
25
25
|
const { siteConfig } = useDocusaurusContext();
|
|
26
26
|
const themeConfig = siteConfig.themeConfig;
|
|
27
27
|
const options = themeConfig.api;
|
|
@@ -83,9 +83,7 @@ function ApiDemoPanel({ item }) {
|
|
|
83
83
|
<Provider store={store2}>
|
|
84
84
|
<div className={styles.apiDemoPanelContainer}>
|
|
85
85
|
<MethodEndpoint method={method} path={path} />
|
|
86
|
-
|
|
87
|
-
<SecuritySchemes />
|
|
88
|
-
|
|
86
|
+
<SecuritySchemes infoPath={infoPath} />
|
|
89
87
|
<div className={styles.optionsPanel}>
|
|
90
88
|
<ParamOptions />
|
|
91
89
|
<Body
|
|
@@ -94,11 +92,8 @@ function ApiDemoPanel({ item }) {
|
|
|
94
92
|
/>
|
|
95
93
|
<Accept />
|
|
96
94
|
</div>
|
|
97
|
-
|
|
98
95
|
<Server />
|
|
99
|
-
|
|
100
96
|
<Curl postman={postman} codeSamples={item["x-code-samples"] ?? []} />
|
|
101
|
-
|
|
102
97
|
<Response />
|
|
103
98
|
</div>
|
|
104
99
|
</Provider>
|
|
@@ -58,6 +58,7 @@ function DocItemContent(props) {
|
|
|
58
58
|
const { content: DocContent } = props;
|
|
59
59
|
const { metadata, frontMatter } = DocContent;
|
|
60
60
|
const {
|
|
61
|
+
info_path: infoPath,
|
|
61
62
|
hide_title: hideTitle,
|
|
62
63
|
hide_table_of_contents: hideTableOfContents,
|
|
63
64
|
toc_min_heading_level: tocMinHeadingLevel,
|
|
@@ -121,7 +122,7 @@ function DocItemContent(props) {
|
|
|
121
122
|
</div>
|
|
122
123
|
{api && (
|
|
123
124
|
<div className="col col--5">
|
|
124
|
-
<ApiDemoPanel item={api} />
|
|
125
|
+
<ApiDemoPanel item={api} infoPath={infoPath} />
|
|
125
126
|
</div>
|
|
126
127
|
)}
|
|
127
128
|
</div>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"format:lib-next": "prettier --config ../../.prettierrc.json --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@docusaurus/module-type-aliases": "2.0.0-beta.
|
|
35
|
-
"@docusaurus/types": "2.0.0-beta.
|
|
34
|
+
"@docusaurus/module-type-aliases": "2.0.0-beta.21",
|
|
35
|
+
"@docusaurus/types": "2.0.0-beta.21",
|
|
36
36
|
"@types/concurrently": "^6.3.0",
|
|
37
37
|
"@types/crypto-js": "^4.1.0",
|
|
38
38
|
"@types/fs-extra": "^9.0.13",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"concurrently": "^5.2.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@docusaurus/theme-common": "2.0.0-beta.
|
|
45
|
+
"@docusaurus/theme-common": "2.0.0-beta.21",
|
|
46
46
|
"@mdx-js/react": "^1.6.21",
|
|
47
47
|
"@monaco-editor/react": "^4.3.1",
|
|
48
48
|
"@paloaltonetworks/postman-code-generators": "1.1.5-hotfix.5",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"buffer": "^6.0.3",
|
|
52
52
|
"clsx": "^1.1.1",
|
|
53
53
|
"crypto-js": "^4.1.1",
|
|
54
|
-
"docusaurus-plugin-openapi-docs": "^1.0.
|
|
54
|
+
"docusaurus-plugin-openapi-docs": "^1.0.3",
|
|
55
55
|
"immer": "^9.0.7",
|
|
56
56
|
"lodash": "^4.17.20",
|
|
57
57
|
"monaco-editor": "^0.31.1",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": ">=14"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "618a438ec42148f525fb92cb11d291ce50d2ad06"
|
|
74
74
|
}
|
|
@@ -15,14 +15,16 @@ function colorForMethod(method: string) {
|
|
|
15
15
|
switch (method.toLowerCase()) {
|
|
16
16
|
case "get":
|
|
17
17
|
return "primary";
|
|
18
|
-
case "put":
|
|
19
|
-
return "warning";
|
|
20
|
-
case "patch":
|
|
21
|
-
return "warning";
|
|
22
18
|
case "post":
|
|
23
19
|
return "success";
|
|
24
20
|
case "delete":
|
|
25
21
|
return "danger";
|
|
22
|
+
case "put":
|
|
23
|
+
return "info";
|
|
24
|
+
case "patch":
|
|
25
|
+
return "warning";
|
|
26
|
+
case "head":
|
|
27
|
+
return "secondary";
|
|
26
28
|
default:
|
|
27
29
|
return undefined;
|
|
28
30
|
}
|
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
+
import Link from "@docusaurus/Link";
|
|
11
|
+
|
|
10
12
|
import { useTypedSelector } from "../hooks";
|
|
11
13
|
|
|
12
|
-
function SecuritySchemes() {
|
|
14
|
+
function SecuritySchemes(props: any) {
|
|
13
15
|
const options = useTypedSelector((state) => state.auth.options);
|
|
14
16
|
const selected = useTypedSelector((state) => state.auth.selected);
|
|
17
|
+
const infoAuthPath = `/${props.infoPath}#authentication`;
|
|
15
18
|
|
|
16
19
|
if (selected === undefined) return null;
|
|
17
20
|
|
|
@@ -28,7 +31,9 @@ function SecuritySchemes() {
|
|
|
28
31
|
if (isApiKey || isBearer) {
|
|
29
32
|
return (
|
|
30
33
|
<React.Fragment key={selected}>
|
|
31
|
-
<b>
|
|
34
|
+
<b>
|
|
35
|
+
Authorization: <Link to={infoAuthPath}>{auth.key}</Link>
|
|
36
|
+
</b>
|
|
32
37
|
<pre
|
|
33
38
|
style={{
|
|
34
39
|
display: "flex",
|
|
@@ -27,7 +27,13 @@ import Server from "./Server";
|
|
|
27
27
|
import { createStoreWithState } from "./store";
|
|
28
28
|
import styles from "./styles.module.css";
|
|
29
29
|
|
|
30
|
-
function ApiDemoPanel({
|
|
30
|
+
function ApiDemoPanel({
|
|
31
|
+
item,
|
|
32
|
+
infoPath,
|
|
33
|
+
}: {
|
|
34
|
+
item: NonNullable<ApiItem>;
|
|
35
|
+
infoPath: string;
|
|
36
|
+
}) {
|
|
31
37
|
const { siteConfig } = useDocusaurusContext();
|
|
32
38
|
const themeConfig = siteConfig.themeConfig as ThemeConfig;
|
|
33
39
|
const options = themeConfig.api;
|
|
@@ -89,9 +95,7 @@ function ApiDemoPanel({ item }: { item: NonNullable<ApiItem> }) {
|
|
|
89
95
|
<Provider store={store2}>
|
|
90
96
|
<div className={styles.apiDemoPanelContainer}>
|
|
91
97
|
<MethodEndpoint method={method} path={path} />
|
|
92
|
-
|
|
93
|
-
<SecuritySchemes />
|
|
94
|
-
|
|
98
|
+
<SecuritySchemes infoPath={infoPath} />
|
|
95
99
|
<div className={styles.optionsPanel}>
|
|
96
100
|
<ParamOptions />
|
|
97
101
|
<Body
|
|
@@ -100,14 +104,11 @@ function ApiDemoPanel({ item }: { item: NonNullable<ApiItem> }) {
|
|
|
100
104
|
/>
|
|
101
105
|
<Accept />
|
|
102
106
|
</div>
|
|
103
|
-
|
|
104
107
|
<Server />
|
|
105
|
-
|
|
106
108
|
<Curl
|
|
107
109
|
postman={postman}
|
|
108
110
|
codeSamples={(item as any)["x-code-samples"] ?? []}
|
|
109
111
|
/>
|
|
110
|
-
|
|
111
112
|
<Response />
|
|
112
113
|
</div>
|
|
113
114
|
</Provider>
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
useWindowSize,
|
|
16
16
|
} from "@docusaurus/theme-common";
|
|
17
17
|
import DocBreadcrumbs from "@theme/DocBreadcrumbs";
|
|
18
|
-
import type { Props
|
|
18
|
+
import type { Props } from "@theme/DocItem";
|
|
19
19
|
import DocItemFooter from "@theme/DocItemFooter";
|
|
20
20
|
import DocPaginator from "@theme/DocPaginator";
|
|
21
21
|
import DocVersionBadge from "@theme/DocVersionBadge";
|
|
@@ -27,14 +27,17 @@ import TOCCollapsible from "@theme/TOCCollapsible";
|
|
|
27
27
|
import clsx from "clsx";
|
|
28
28
|
import type { ApiItem as ApiItemType } from "docusaurus-plugin-openapi-docs/lib/types";
|
|
29
29
|
|
|
30
|
+
import { DocFrontMatter } from "../../types";
|
|
30
31
|
import styles from "./styles.module.css";
|
|
31
32
|
|
|
32
|
-
let ApiDemoPanel = (_: { item: any }) =>
|
|
33
|
+
let ApiDemoPanel = (_: { item: any; infoPath: any }) => (
|
|
34
|
+
<div style={{ marginTop: "3.5em" }} />
|
|
35
|
+
);
|
|
33
36
|
if (ExecutionEnvironment.canUseDOM) {
|
|
34
37
|
ApiDemoPanel = require("@theme/ApiDemoPanel").default;
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
interface ApiFrontMatter extends
|
|
40
|
+
interface ApiFrontMatter extends DocFrontMatter {
|
|
38
41
|
readonly api?: ApiItemType;
|
|
39
42
|
}
|
|
40
43
|
|
|
@@ -52,11 +55,12 @@ function DocItemContent(props: Props): JSX.Element {
|
|
|
52
55
|
const { content: DocContent } = props;
|
|
53
56
|
const { metadata, frontMatter } = DocContent;
|
|
54
57
|
const {
|
|
58
|
+
info_path: infoPath,
|
|
55
59
|
hide_title: hideTitle,
|
|
56
60
|
hide_table_of_contents: hideTableOfContents,
|
|
57
61
|
toc_min_heading_level: tocMinHeadingLevel,
|
|
58
62
|
toc_max_heading_level: tocMaxHeadingLevel,
|
|
59
|
-
} = frontMatter;
|
|
63
|
+
} = frontMatter as DocFrontMatter;
|
|
60
64
|
const { title } = metadata;
|
|
61
65
|
|
|
62
66
|
const { api } = frontMatter as ApiFrontMatter;
|
|
@@ -121,7 +125,7 @@ function DocItemContent(props: Props): JSX.Element {
|
|
|
121
125
|
</div>
|
|
122
126
|
{api && (
|
|
123
127
|
<div className="col col--5">
|
|
124
|
-
<ApiDemoPanel item={api} />
|
|
128
|
+
<ApiDemoPanel item={api} infoPath={infoPath} />
|
|
125
129
|
</div>
|
|
126
130
|
)}
|
|
127
131
|
</div>
|
package/src/types.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
+
import type { FrontMatterTag } from "@docusaurus/utils";
|
|
8
9
|
import type { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
|
9
10
|
|
|
10
11
|
export interface ThemeConfig {
|
|
@@ -68,3 +69,114 @@ export interface ExternalDocumentationObject {
|
|
|
68
69
|
description?: string;
|
|
69
70
|
url: string;
|
|
70
71
|
}
|
|
72
|
+
|
|
73
|
+
export type FileChange = {
|
|
74
|
+
author?: string;
|
|
75
|
+
/** Date can be any
|
|
76
|
+
* [parsable date string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
|
|
77
|
+
*/
|
|
78
|
+
date?: Date | string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type DocFrontMatter = {
|
|
82
|
+
/**
|
|
83
|
+
* The last part of the doc ID (will be refactored in the future to be the
|
|
84
|
+
* full ID instead)
|
|
85
|
+
* @see {@link DocMetadata.id}
|
|
86
|
+
*/
|
|
87
|
+
id?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Will override the default title collected from h1 heading.
|
|
90
|
+
* @see {@link DocMetadata.title}
|
|
91
|
+
*/
|
|
92
|
+
title?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Front matter tags, unnormalized.
|
|
95
|
+
* @see {@link DocMetadata.tags}
|
|
96
|
+
*/
|
|
97
|
+
tags?: FrontMatterTag[];
|
|
98
|
+
/**
|
|
99
|
+
* If there isn't a Markdown h1 heading (which, if there is, we don't
|
|
100
|
+
* remove), this front matter will cause the front matter title to not be
|
|
101
|
+
* displayed in the doc page.
|
|
102
|
+
*/
|
|
103
|
+
hide_title?: boolean;
|
|
104
|
+
/** Hide the TOC on the right. */
|
|
105
|
+
hide_table_of_contents?: boolean;
|
|
106
|
+
/** Used in the head meta. */
|
|
107
|
+
keywords?: string[];
|
|
108
|
+
/** Used in the head meta. Should use `assets.image` in priority. */
|
|
109
|
+
image?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Will override the default excerpt.
|
|
112
|
+
* @see {@link DocMetadata.description}
|
|
113
|
+
*/
|
|
114
|
+
description?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Custom slug appended after /<baseUrl>/<routeBasePath>/<versionPath>
|
|
117
|
+
* @see {@link DocMetadata.slug}
|
|
118
|
+
*/
|
|
119
|
+
slug?: string;
|
|
120
|
+
/** Customizes the sidebar label for this doc. Will default to its title. */
|
|
121
|
+
sidebar_label?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Controls the position of a doc inside the generated sidebar slice when
|
|
124
|
+
* using autogenerated sidebar items.
|
|
125
|
+
*
|
|
126
|
+
* @see https://docusaurus.io/docs/sidebar#autogenerated-sidebar-metadata
|
|
127
|
+
*/
|
|
128
|
+
sidebar_position?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Gives the corresponding sidebar label a special class name when using
|
|
131
|
+
* autogenerated sidebars.
|
|
132
|
+
*/
|
|
133
|
+
sidebar_class_name?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Will be propagated to the final sidebars data structure. Useful if you
|
|
136
|
+
* have swizzled sidebar-related code or simply querying doc data through
|
|
137
|
+
* sidebars.
|
|
138
|
+
*/
|
|
139
|
+
sidebar_custom_props?: { [key: string]: unknown };
|
|
140
|
+
/**
|
|
141
|
+
* Changes the sidebar association of the current doc. Use `null` to make
|
|
142
|
+
* the current doc not associated to any sidebar.
|
|
143
|
+
*/
|
|
144
|
+
displayed_sidebar?: string | null;
|
|
145
|
+
/**
|
|
146
|
+
* Customizes the pagination label for this doc. Will default to the sidebar
|
|
147
|
+
* label.
|
|
148
|
+
*/
|
|
149
|
+
pagination_label?: string;
|
|
150
|
+
/** Overrides the default URL computed for this doc. */
|
|
151
|
+
custom_edit_url?: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* Whether number prefix parsing is disabled on this doc.
|
|
154
|
+
* @see https://docusaurus.io/docs/sidebar#using-number-prefixes
|
|
155
|
+
*/
|
|
156
|
+
parse_number_prefixes?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Minimum TOC heading level. Must be between 2 and 6 and lower or equal to
|
|
159
|
+
* the max value.
|
|
160
|
+
*/
|
|
161
|
+
toc_min_heading_level?: number;
|
|
162
|
+
/** Maximum TOC heading level. Must be between 2 and 6. */
|
|
163
|
+
toc_max_heading_level?: number;
|
|
164
|
+
/**
|
|
165
|
+
* The ID of the documentation you want the "Next" pagination to link to.
|
|
166
|
+
* Use `null` to disable showing "Next" for this page.
|
|
167
|
+
* @see {@link DocMetadata.next}
|
|
168
|
+
*/
|
|
169
|
+
pagination_next?: string | null;
|
|
170
|
+
/**
|
|
171
|
+
* The ID of the documentation you want the "Previous" pagination to link
|
|
172
|
+
* to. Use `null` to disable showing "Previous" for this page.
|
|
173
|
+
* @see {@link DocMetadata.prev}
|
|
174
|
+
*/
|
|
175
|
+
pagination_prev?: string | null;
|
|
176
|
+
/** Should this doc be excluded from production builds? */
|
|
177
|
+
draft?: boolean;
|
|
178
|
+
/** Allows overriding the last updated author and/or date. */
|
|
179
|
+
last_update?: FileChange;
|
|
180
|
+
/** Provides OpenAPI Docs with a reference path to their respective Info Doc */
|
|
181
|
+
info_path?: string;
|
|
182
|
+
};
|