Files
strapi/docs/sidebars.ts
Andrei L d353b279e4 chore(docs): migrate docusaurus config to typescript (#26471)
Convert the docs Docusaurus config files to TypeScript to match the
modern Docusaurus scaffold and give editors correct per-file types:

- docusaurus.config.js -> .ts (typed Config / Preset options, ESM)
- sidebars.js -> .ts (typed SidebarsConfig)
- remark-design-system-links.js -> .ts (typed Transformer<Root>)
- babel.config.js: ESM export, @docusaurus/babel preset (3.x split)
- add docs/tsconfig.json extending @docusaurus/tsconfig (editor-only,
  not used by docusaurus build)
- add @docusaurus/babel, @docusaurus/tsconfig, @types/mdast deps

Also adds "docs" to the root jsconfig.json excludes, since docs is a
standalone Docusaurus project that now owns its own config.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2026-05-28 14:16:43 +00:00

24 lines
778 B
TypeScript

/**
* 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.
*/
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
docs: [{ type: 'autogenerated', dirName: 'docs' }],
api: [{ type: 'autogenerated', dirName: 'api' }],
exports: [{ type: 'autogenerated', dirName: 'exports' }],
guides: [{ type: 'autogenerated', dirName: 'guides' }],
rfcs: [{ type: 'autogenerated', dirName: 'rfcs' }],
};
export default sidebars;