docusaurus/packages/docusaurus-plugin-content-docs/src/sidebars
Alexey Pyltsyn a307da0b9f
feat(logger): new "url" format, add double quotes around paths (#7019)
* refactor(logger): add double quotes around paths

* Introduce url formatter

* Fix
2022-03-27 14:59:20 +08:00
..
__tests__ refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027) 2022-03-27 12:57:15 +08:00
generator.ts refactor: fix a few places of path handling (#7023) 2022-03-26 22:49:50 +08:00
index.ts fix(content-docs): give context about sidebar loading failure (#6887) 2022-03-10 11:21:10 +08:00
normalization.ts feat(logger): new "url" format, add double quotes around paths (#7019) 2022-03-27 14:59:20 +08:00
postProcessor.ts refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027) 2022-03-27 12:57:15 +08:00
processor.ts refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027) 2022-03-27 12:57:15 +08:00
README.md refactor(content-docs): clean up sidebars logic; validate generator returns (#6596) 2022-02-04 09:46:25 +08:00
types.ts refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027) 2022-03-27 12:57:15 +08:00
utils.ts refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027) 2022-03-27 12:57:15 +08:00
validation.ts refactor: ensure all types are using index signature instead of Record (#6995) 2022-03-25 18:06:30 +08: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.
  5. Post-processing. Defaults are applied (collapsed states), category links are resolved, empty categories are flattened. Returns Sidebars.