Skip to content

we need a way to ":include" a remote markdown file, and all the relative URLs should be relative to that. #1977

Open
@trusktr

Description

@trusktr

Feature request

What problem does this feature solve?

Currently, if you make an include with [include](//foo.com/foo.md ":include"), if the include has relative paths, they have a high chance of being wrong because Docsify treats them relative to the current site, not the site when the content came from.

I would consider Docsify's behavior incorrect, but it seems like a big enough breaking change to actually change the default behavior for v4.

Of course, we can always start releasing breaking changes, along with a really good migration guide, and start incrementing the major number. I'm all for that.

What does the proposed API look like?

maybe a new option linksRelativeToIncludeSource would make the new behavior when set to true. Name ideas?

How should this be implemented in your opinion?

Just track the URL of the included content, then any ./relative paths need to be resolved relative to the included location.

Are you willing to work on this yourself?

Yeah, time willing

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