docusaurus/packages/docusaurus-plugin-content-docs/src/sidebars
Sébastien Lorber c8fc3311f1
Some checks are pending
Argos CI / take-screenshots (push) Waiting to run
Build Hash Router / Build Hash Router (push) Waiting to run
Canary Release / Publish Canary (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Continuous Releases / Continuous Releases (push) Waiting to run
E2E Tests / E2E — Yarn v1 (20) (push) Waiting to run
E2E Tests / E2E — Yarn v1 (20.0) (push) Waiting to run
E2E Tests / E2E — Yarn v1 (22) (push) Waiting to run
E2E Tests / E2E — Yarn v1 (24) (push) Waiting to run
E2E Tests / E2E — Yarn v1 Windows (push) Waiting to run
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Waiting to run
E2E Tests / E2E — npm (push) Waiting to run
E2E Tests / E2E — pnpm (push) Waiting to run
fix(docs): add support for missing `sidebar_key` front matter attribute (#11490)
2025-10-17 12:34:08 +02:00
..
__tests__ fix(docs): add support for missing `sidebar_key` front matter attribute (#11490) 2025-10-17 12:34:08 +02:00
README.md fix(content-docs): restore functionality when a category only has index page (#7385) 2022-05-10 14:50:43 +08:00
generator.ts fix(docs): add support for missing `sidebar_key` front matter attribute (#11490) 2025-10-17 12:34:08 +02:00
index.ts feat(core): support TypeScript + ESM configuration (#9317) 2023-10-14 02:46:03 +02:00
normalization.ts fix(content-docs): allow translating doc labels in sidebars.js (#7634) 2022-06-16 16:11:21 +02:00
postProcessor.ts fix(docs): Fix empty sidebar item category `className` lost when post-processed to a doc (#11281) 2025-06-19 19:04:28 +02:00
processor.ts chore(plugin-docs): remove legacy versioned prefix on doc ids and sidebar names in versioned sidebars (#9310) 2023-09-15 18:52:42 +02:00
types.ts feat(docs): sidebar item `key` attribute - fix docs translations key conflicts (#11228) 2025-07-03 13:40:00 +02:00
utils.ts refactor: remove unnecessary undefined & use optional chain (#11192) 2025-05-26 13:07:56 +02:00
validation.ts feat(docs): sidebar item `key` attribute - fix docs translations key conflicts (#11228) 2025-07-03 13:40:00 +02:00

Sidebars

This part is very complicated and hard to navigate. Sidebars are loaded through the following steps:

  1. Loading. The sidebars file is read. Returns SidebarsConfig.
  2. Normalization. The shorthands are expanded. This step is very lenient about the sidebars' shapes. Returns NormalizedSidebars.
  3. Validation. The normalized sidebars are validated. This step happens after normalization, because the normalized sidebars are easier to validate, and allows us to repeatedly validate & generate in the future.
  4. Generation. This step is done through the "processor" (naming is hard). The autogenerated items are unwrapped. In the future, steps 3 and 4 may be repeatedly done until all autogenerated items are unwrapped. Returns ProcessedSidebars.
    • Important: this step should only care about unwrapping autogenerated items, not filtering them, writing additional metadata, applying defaults, etc.—everything will be handled in the post-processor. Important because the generator is exposed to the end-user and we want it to be easy to be reasoned about.
  5. Post-processing. Defaults are applied (collapsed states), category links are resolved, empty categories are flattened. Returns Sidebars.