facebook / facebook/docusaurus

Bias sidebar documentation to autogenerated

Offen
#7,917 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
documentation
Vorherrschende Sprache
TypeScript
Sterne
66.2k
Forks
10k
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
52

Beschreibung

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).

### Description

Currently, the sidebar docs is first describing the `sidebars.js` API, and then going on to demonstrate how autogenerated configuration maps to the "old-style API". This is technically correct since autogenerated is just sugar over sidebars.js. However to most users this means they have to look up docs in two places—for example, for category index, they have to first find out the concept and accepted fields in https://docusaurus.io/docs/sidebar/items#category-link, and then how it's implemented in https://docusaurus.io/docs/sidebar/autogenerated#category-item-metadata. This is easily confusing.

I suggest we bias the docs towards autogenerated. I don't have solid plans on how that would work, but maybe we can first introduce how the file system maps to docs and categories, and then for each API, offer a tab set between sidebars.js and autogenerated.

### Self-service

- [X] I'd be willing to address this documentation request myself.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.