Skip to content
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

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

Closed
1 task done
jhildenbiddle opened this issue Oct 25, 2020 · 1 comment
Closed
1 task done

Comments

@jhildenbiddle
Copy link
Member

jhildenbiddle commented Oct 25, 2020

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:

  • coverpage: '/docs/_coverpage.md' makes a request for //docs/_coverpage.md
  • coverpage: 'http://domain.com/_coverpage.md' makes a request for /http://domain.com/_coverpage.md

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

path = this.router.getFile(root + path);

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

  • Bug does still occur when all/other plugins are disabled?

  • Docsify version: 4.11.6

@jhildenbiddle jhildenbiddle changed the title Unable to user absolute path as coverpage URL Unable to use absolute path for coverpage, loadNavbar, or loadSidebar options Oct 25, 2020
@jhildenbiddle
Copy link
Member Author

Bug acknowledged. Tracking with #1891.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant