Skip to content

How to embed absolute links when serving from a subdirectory in a domain? #1258

Open
@schungx

Description

@schungx

Say, I have a link going to another page and I need it starting from the root:

[some url link](/path/to/page.md)

This gets compiled to a link to the correct page:

<a href="/path/to/page.html">some url link</a>

However, this doesn't work if I'm serving from a subdirectory:

http://example.com/my_book/path/to/page.html

The absolute url will skip over the subdirectory my_book and point to http://example.com/path/to/page.html which doesn't exist.

How can we specify that links should go to an absolute path based upon the root location of the book?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LinksArea: Issues with links

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions