Allow hooks to work for Sidenav
- 主要言語
- JavaScript
- スター
- 31.5k
- フォーク
- 5.8k
- 平均マージ
- 9日 8時間
- マージ済み PR(30日)
- 2
説明
## Feature request
Allow hooks to work for Sidenav (and perhaps Navbar)
#### What problem does this feature solve?
I have a need where sidebar data is being generated (outside of my control) in a format different from that specified for './_sidebar.md'. With hooks enabled I can modify the sidebar information to the format Docsify wants.
#### What does the proposed API look like?
No changes to the API
#### How should this be implemented in your opinion?
Add `beforeEach` and `AfterEach` hooks to `proto._renderSidebar` when invoking `proto.renderTo` in the same pattern as `proto._renderMain` in 'src/render/index.js'. Though I am not sure since I cannot claim to fully understand the code.
#### Are you willing to work on this yourself?
Only if a maintainer will discuss proposed changes in code and verify my changes! Last thing I want to do is upload a poor PR that breaks things!!!
コントリビューションガイド
調査の方向性
src/render/index.js で proto._renderSidebar と proto._renderMain を比較することから始め、特に proto.renderTo が既存のフックをどのように呼び出しているかを確認します。Sidenav、場合によっては Navbar の意図された動作を maintainer に確認してください。完了の条件は、既存のレンダリングフローを壊さずに、サイドバーのレンダリング時に要求されたフックが実行されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100