-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebars.js
More file actions
36 lines (32 loc) · 943 Bytes
/
Copy pathsidebars.js
File metadata and controls
36 lines (32 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* eslint-disable no-undef */
// @ts-check
// Import the TypeDoc-generated sidebar (exists after first build)
const guidesOnly = process.env.AGENTOS_DOCS_GUIDES_ONLY === '1';
let typedocSidebar = [];
try {
typedocSidebar = require('./docs/api/typedoc-sidebar.cjs');
} catch {
// First build — TypeDoc hasn't run yet, API sidebar will be empty
}
const { buildGuideSidebar } = require('../../packages/agentos/docs/publication-manifest.cjs');
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
guideSidebar: ['index']
.concat(buildGuideSidebar())
.concat(
!guidesOnly
? [
{
type: 'category',
label: 'API Reference',
link: {
type: 'doc',
id: 'api/index',
},
items: typedocSidebar,
},
]
: [],
),
};
module.exports = sidebars;