Skip to content

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

Description

@davestewart

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!

Activity

  1. FrancesCoronel commented on Jul 12, 2018

    @FrancesCoronel

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

  2. FrancesCoronel commented on Jul 12, 2018

    @FrancesCoronel

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

  3. SidVal commented on Jul 26, 2018

    @SidVal
    Member

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

  4. upupming commented on Nov 26, 2018

    @upupming
    Contributor

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

  5. stale commented on Feb 4, 2020

    @stale

    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.

  6. Evidlo commented on Jun 10, 2021

    @Evidlo

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

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

  7. jhildenbiddle commented on Mar 2, 2024

    @jhildenbiddle
    Member

    Bug acknowledged. Tracking with #1891.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions