-
-
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
"href" of sidebar headers #1069
Comments
Just to confirm what I understood. You have a link in sidebar (chapter) which has some external links please correct me if I am wrong ok, there are few limitations, // _sidebar.md
* [chapter](./somelink.md) when this link is clicked, few things happens
now can you explain where you want the changes from these steps ! |
OK, let me clear. what I mean is the For a detail example:
When the
And click Do some change, add a link:
When the
And click This is my point, I wish it works same as before. And click Sidebar should always do navigate, in my expect. And now, I modified it like
And in sidebar
as html, it is
Then I use css to keep the a:first-child display, and hide others(the "link"). My native language is not English, so if some part is still not clear, tell me please. |
Currently, we render the subSideBar according to ur titles in markdown content. For example:
Firstly, the title was render to
and
(As for the 2nd one, the browser would correct the synax.)
I think it a good proposal. mightly, it wouldn't resolve it soon. |
ok I see the issue! |
Bug Report
This maybe should be a feature request, I'm not sure.
I just tell what happen and what I expect.
Steps to reproduce
In markdown file, wrote a header with link, like:
and use sidebar.
What is current behaviour
In sidebar, if you click
chapter
and chapter is a normal header(without link), it will guide you to the position(y scroll) ofchapter
in page. (this is normal case)But if the
chapter
header has had ahref
, click the titlechapter
in sidebar, will open a new page with "https://wikisource.com/chapter".What is the expected behaviour
In sidebar, whether or not I have a link, click should always bring me to the correct position in the doc.
And if I click the "chapter" header (with link) in the doc, then go open the link in new page.
Sidebar should always be a “navigation”, a guide to position in doc, not to outside.
Other relevant information
Your OS: win10 1909
Node.js version: 10.12.0
npm/yarn version: 6.4.1
Browser version: chrome Version 80.0.3987.132 (Official Build) (64-bit)
Docsify version: 4.11.2
Docsify plugins: I've remove all plugins, its same.
I've tried to change it like
The sidebar will display "chapter-🔗", in two lines (because of css display:block).
Click
chapter
, go the position in doc, it works. And click🔗
, go outside site page, its fine. Then I can modify the css to make them in one line.But I still wish you can consider about this.
And thanks for your time.
The text was updated successfully, but these errors were encountered: