facebook / facebook/docusaurus

Ability to expose extra docs data to existing pages (ex: expose frontMatter in tags pages)

オープン
#8,886 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
proposal
主要言語
TypeScript
スター
66.2k
フォーク
10k
平均マージ
1日 3時間
マージ済み PR(30日)
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#issues).

### Motivation

I want to expose more data from docs inside auto-generated tags pages (DocTagDocListPage).

Currently, there are only few things exposed ( `docusaurus/packages/docusaurus-plugin-content-docs/src/props.ts` ):
- id
- title
- description
- permalink

Generated tags pages are simple. I would like to improve them a lot by using more data from docs like front matter, especially since I've got a lot of custom front matter attributes.
For now, modifying & extending tags pages is very limited due to limited info.

Since those pages are generated outside of DocProviders, i didn't find a way to fetch more data otherwise that modify whole plugin workflow ( probably modifying `contentLoaded` function )

Moreover, I don't understand why currently only those 4 fields are exposed for tags pages.

### Self-service

- [X] I'd be willing to do some initial work on this proposal myself.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。