Allow hooks to work for Sidenav
- Langage dominant
- JavaScript
- Étoiles
- 31.5k
- Forks
- 5.8k
- Merge moyen
- 9 j 8 h
- PR mergées (30 j)
- 2
Description
## 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!!!
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez dans src/render/index.js en comparant proto._renderSidebar et proto._renderMain, en particulier la manière dont proto.renderTo appelle les hooks existants. Confirmez avec un mainteneur le comportement attendu pour Sidenav et éventuellement Navbar ; le travail est terminé lorsque les hooks demandés sont exécutés lors du rendu de la sidebar sans perturber le flux de rendu existant.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100