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

Links do not work when viewing pages in Github/Bitbucket/etc. #3

Open
zachhannum opened this issue Jan 23, 2020 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@zachhannum
Copy link
Owner

When viewing the source documentation, relative links do not work. This is expected behavior since the plugin only calculates the relative paths and modifies the markdown on the fly before being processed into HTML, but this of course means that when viewing the markdown in the source repository, links between pages do not work.

I'm not sure at the moment how to actually make this work.

@zachhannum zachhannum added enhancement New feature or request bug Something isn't working and removed bug Something isn't working labels Jan 23, 2020
@oxr463
Copy link
Contributor

oxr463 commented Feb 28, 2020

If you input a relative URL, then it should still attempt to find it when generating the site.
That way the links still work for both.

For example, in your mkdocs.yml:

plugins:
  - autolinks:
      override_relative: True

Then in doc/foo.md:

This is my link to [bar](../bar.md).

When override_relative is set, the plugin should first drop the path to the file, and then search for the file like it already does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants