docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.81k stars 5.68k forks source link

Unable to use absolute path for coverpage, loadNavbar, or loadSidebar options #1407

Closed jhildenbiddle closed 8 months ago

jhildenbiddle commented 4 years ago

Bug Report

Steps to reproduce

Set coverpage, loadNavbar, or loadSidebar options to an absolute URL and load site. For example:

coverpage: '/docs/_coverpage.md'
coverpage: 'http://domain.com/_coverpage.md'

What is current behaviour

Docisfy incorrectly assumes all URLs should be prepended with a forward slash resulting in the following:

For coverpage, I was able to identify the line causing the issue here:

https://github.com/docsifyjs/docsify/blob/8cf9fd8150bd67709c68d8dfe4dc881624583ac8/src/core/fetch/index.js#L163

What is the expected behaviour

Docsify should not assume all URLs should be prepended with a forward slash. More investigation is needed to determine why docsify is concatenating root + path in the source (see above).

Other relevant information

jhildenbiddle commented 8 months ago

Bug acknowledged. Tracking with #1891.