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

Same-level, sub-folder links, don't resolve properly #424

Closed
davestewart opened this issue Mar 14, 2018 · 7 comments
Closed

Same-level, sub-folder links, don't resolve properly #424

davestewart opened this issue Mar 14, 2018 · 7 comments

Comments

@davestewart
Copy link

davestewart commented Mar 14, 2018

I'm finding that relative links don't resolve properly in subfolders.

Take this directory structure:

+- docs
    +- foo
        +- bar.md
        +- baz.md

If I'm in /#/foo/bar then click to navigate to baz:

Click to go to the [baz](baz.md) page.

The HTML link renders like this:

Click to go to the <a href="#/baz"> page

It should be:

Click to go to the <a href="#/foo/baz"> page

I've also tried with history mode, but I get:

<a href="/baz">

I've also tried changing the basePath configuration but no luck.

The only way I have managed to get this to work is with absolute paths:

// within /foo/bar.md

[baz](/foo/baz.md)

Have I missed something?

Thanks!

@QingWei-Li QingWei-Li added the bug confirmed as a bug label Mar 19, 2018
@FrancesCoronel
Copy link
Contributor

Would love to see this as I'm having issues with a current project I'm working on because the paths are broken.

@FrancesCoronel
Copy link
Contributor

FrancesCoronel commented Jul 12, 2018

@QingWei-Li Is there a temporary workaround for this in the meantime - similar to #451?

@SidVal
Copy link
Member

SidVal commented Jul 26, 2018

Mmm @davestewart did you try this #451 (comment) ?

@upupming
Copy link
Contributor

As far as I can see, docsify treats all links as absolute links and we have to use absolute links, really not efficient 😢

@stale
Copy link

stale bot commented Feb 4, 2020

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.

@Evidlo
Copy link

Evidlo commented Jun 10, 2021

I believe this is solved by seting relativePath in your config.

https://docsify.js.org/#/configuration?id=relativepath

@jhildenbiddle
Copy link
Member

Bug acknowledged. Tracking with #1891.

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

No branches or pull requests

9 participants