Repository navigation
Expand file tree
/
Copy pathsidebars.js
More file actions
44 lines (36 loc) · 1.65 KB
/
Copy pathsidebars.js
File metadata and controls
44 lines (36 loc) · 1.65 KB
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
37
38
39
40
41
42
43
44
// @ts-check
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
import { fileURLToPath } from 'node:url';
import {
collectEvents,
eventsSidebarItems,
groupByYear,
} from './scripts/lib/events-catalog.mjs';
const docsDir = fileURLToPath(new URL('./docs', import.meta.url));
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
@type {import('@docusaurus/plugin-content-docs').SidebarsConfig}
*/
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure.
// The one single-page section (practitioners) intentionally has no sidebar
// so it renders full-width.
//
// The architectures sidebar is listed explicitly rather than autogenerated:
// only the two repo-authored pages belong in the menu. The imported
// architecture pages (see scripts/lib/architecture-pages.mjs) stay out of
// every sidebar so they keep rendering full-width.
architecturesSidebar: ['architectures/index', 'architectures/submit'],
communitySidebar: [{ type: 'autogenerated', dirName: 'community' }],
// Derived from the event pages' front matter (ADR 0012); see
// eventsSidebarItems() for the shape. Docusaurus reads every named export
// of this file as a sidebar, so the helper lives in the library.
eventsSidebar: eventsSidebarItems(groupByYear(collectEvents(docsDir))),
resourcesSidebar: [{ type: 'autogenerated', dirName: 'resources' }],
};
export default sidebars;