facebook / facebook/docusaurus

Bias sidebar documentation to autogenerated

未关闭
#7,917 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
documentation
主要语言
TypeScript
星标
66.2k
派生
10k
平均合并
1 天 3 小时
30 天内合并 PR
52

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。