facebook / facebook/docusaurus

Bias sidebar documentation to autogenerated

Aperta
#7,917 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
documentation
Lingua principale
TypeScript
Stelle
66.2k
Fork
10k
Merge medio
1g 3h
PR unite (30g)
52

Descrizione

### 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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.