-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
When relativePath: true
, even absolute paths are for icons in sidebar are resolved as relative.
#877
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
Comments
While I understand your intention (and you're right), here's a small note:
they simple start at a different root-directory. A relative path would ideally start with an './' (or even without a slash). This is an important feature, because otherwise it's cumbersome to link from one .md to the contents of another <sibling/parent/child>.md. |
Resolving image seems to use a different algorithm that's why images are not working. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I can reproduce this in any page:  is resolved as:
Given the URL is absolute I don't understand why Docsify feels like it should consider it relative, especially since I don't set |
…ve method as use same router with markdown file then remove beginning # (docsifyjs#877、docsifyjs#850)
…, solve method as use same router with markdown file then remove beginning "#" (docsifyjs#877、docsifyjs#850)
Bug acknowledged. Tracking with #1891. |
Bug Report
When
relativePath: true
, absolute paths are for icons in sidebar are resolved as relative.Steps to reproduce
Set
relativePath: true
In the both _sidebar files, I have
- [Home](/ "Home")
What is current behaviour
While the link gets resolved as absolute (👍 ),
for images,
the data-origin is correct (👍 ), but the img scr is relative and thus failing (👎 )
What is the expected behaviour
The img src should be absolute:
"/assets/home.svg"
Other relevant information
Bug does still occur when all/other plugins are disabled?
Your OS:
Node.js version:
npm/yarn version:
Browser version:
Docsify version: 4.9.4
Docsify plugins: pagination, themeable
The text was updated successfully, but these errors were encountered: