-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[hook]: New hook #1230
Comments
nice idea ! user will hv more operability of the nav. hook.updateNav(function(nav){
return
`<a href="#/more-pages?id=more-pages" data-id="more-pages" class="anchor"><span>More pages</span></a>
<a href="#/quickstart?id=quick-start" data-id="quick-start" class="anchor"><span>Quick start</span></a>`
}), I wonder if there would hv another solution of those I prefer to let users just write the pseudo code hook.updateNav(function(nav){
return
[ '/more-pages?id=more-pages',
'/quickstart?id=quick-start']
}), besides that, if user wanna the deep level nav, it would be more complicated. |
yeah thats a good point, though currently writing markdown relative to root I guess. . , would it make more sense to be relative to |
nah, if the hook were relative to I thought the |
this is actually a kind of better way for plugins to change the navbar content instead of doing hacky js code. |
I found that the navbar have the translation issues that it wont be replaced (no options now) when the language changed. |
For what it is worth, I'd also be interested in seeing this feature added. I ran across this issue with my Docsify-This.net project and trying to re-write URL links in the Navbar to work with remote Docsify sites. I use hook.afterEach to do this for main Markdown content but discovered no way to do the same with the Navbar. |
Feature request
A new hook to update the content of navbar
What problem does this feature solve?
This will be useful as it will support the creating of dynamic navbars, control over the navbar with just markdown.
What does the proposed API look like?
Ref Poc #1229
How should this be implemented in your opinion?
#1229
Are you willing to work on this yourself?
Yeah, if anyone else wants to pick it feel free to continue
NOTE
This is not the priority as of now. I have opened this just for discussion as we are having some discussion as well for other features.
I would also welcome request for other new hooks as well.
The text was updated successfully, but these errors were encountered: