Skip to content

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

Description

@jhildenbiddle

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions