zachhannum/mkdocs-autolinks-plugin

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

zachhannum opened this issue · 1 comments

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.

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.