Fix: When relativePath: false, use root absolute paths are for images… by ikfly · Pull Request #1792 · docsifyjs/docsify
…ve method as use same router with markdown file then remove beginning # (#877、#850)
Summary
When relativePath: false, use root absolute paths for images,a small change as use same router with .md file ,fix #877、#850
What kind of change does this PR introduce?
Bugfix
For any code change,
- Related documentation has been updated if needed
- Related tests have been updated or tests have been added
Does this PR introduce a breaking change? (check one)
- Yes
- No
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
Tested in the following browsers:
- Chrome
- Firefox
- Safari
- Edge
- IE
my tests
relativePath: false
currentPath: /doc/home
href: images/myImage.png
url: /images/myImage.png
currentPath: /doc/home
href: https://github.com/docsifyjs/docsify/blob/develop/docs/_images/zh-cn/nested-navbar.png
url: https://github.com/docsifyjs/docsify/blob/develop/docs/_images/zh-cn/nested-navbar.png
relativePath: true
currentPath: /doc/home
href: images/myImage.png
url: /doc/images/myImage.png
currentPath: /doc/home
href: https://github.com/docsifyjs/docsify/blob/develop/docs/_images/zh-cn/nested-navbar.png
url: https://github.com/docsifyjs/docsify/blob/develop/docs/_images/zh-cn/nested-navbar.png