facebook / facebook/docusaurus

Bias sidebar documentation to autogenerated

Abierto
#7,917 3 comentarios 0 reacciones 0 asignados Ver en GitHub
documentation
Lenguaje dominante
TypeScript
Estrellas
66.2k
Forks
10k
Merge medio
1 d 3 h
PR fusionados (30 d)
52

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.