Skip to content

Commit f2efa0e

Browse files
committed
fix: type of OpenAISidebar
1 parent b9301cb commit f2efa0e

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

src/configs/openApiSidebar.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
export const OpenApiSidebar = [
1+
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
2+
3+
export const OpenApiSidebar: SidebarsConfig = {
4+
openApiSidebar: [
25
{
3-
type: "category",
4-
label: "Blog",
5-
link: {
6-
type: "generated-index",
7-
title: "Blog API",
8-
description:
9-
"CSlant API Documentation uses the OpenAPI Specification to provide a detailed reference for all available endpoints, request and response examples, and more.",
10-
slug: "/category/blog-api"
11-
},
12-
items: require("../../docs/blog/sidebar.js")
13-
},
14-
]
6+
type: 'category',
7+
label: 'Blog',
8+
link: {
9+
type: 'generated-index',
10+
title: 'Blog API',
11+
description:
12+
'CSlant API Documentation uses the OpenAPI Specification to provide a detailed reference for all available endpoints, request and response examples, and more.',
13+
slug: '/category/blog-api'
14+
},
15+
items: require('../../docs/blog/sidebar.js')
16+
}
17+
]
18+
};

src/configs/sidebars.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
2-
import { OpenApiSidebar } from "./openApiSidebar";
1+
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
2+
import { OpenApiSidebar } from './openApiSidebar';
33

44
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
55

@@ -15,7 +15,7 @@ import { OpenApiSidebar } from "./openApiSidebar";
1515
*/
1616
const sidebars: SidebarsConfig = {
1717
// By default, Docusaurus generates a sidebar from the docs folder structure
18-
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
18+
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
1919

2020
// But you can create a sidebar manually
2121
/*
@@ -29,8 +29,8 @@ const sidebars: SidebarsConfig = {
2929
},
3030
],
3131
*/
32-
33-
openApiSidebar: OpenApiSidebar,
32+
33+
...OpenApiSidebar
3434
};
3535

3636
export default sidebars;

0 commit comments

Comments
 (0)