mkdocstrings / autorefs

Automatically link across pages in MkDocs.
https://mkdocstrings.github.io/autorefs/
ISC License
51 stars 7 forks source link

feat: Support registering handlers that load an external inventory #4

Closed oprypin closed 3 years ago

oprypin commented 3 years ago

These identifiers are then possible to refer to, they're checked against and substituted (as absolute URLs) in case there's no such identifier on the current site.

Example of how an external handler can be registered:

pawamoy commented 3 years ago

So, we could specify multiple URLs to try and fetch the inventory file, but there's no way to specify the base URL, which could be different, or hard to resolve from the inventory URL for the handler?

oprypin commented 3 years ago

we could specify multiple URLs to try and fetch the inventory file,

Oh, no, this is just individual URLs of different inventories. There's no support for fallbacks or different base url, indeed.

That'd need to be designed. But I think it can be just an extension of this. Say, instead of a string you just pass a list or a dict with those values

oprypin commented 3 years ago

We decided to do inventory handling in mkdocstrings after all, not in autorefs

oprypin commented 3 years ago

I just wanted to rebase this to get the smaller diff. Still don't intend to merge this though :>