Description
Is your feature request related to a problem? Please describe.
Currently, autorefs stores identifiers, URLs (internal/external) and optional titles. This is quite limited in cross-language setups.
Describe the solution you'd like
Support proper inventories (with domains, roles, display names, etc.). The primary/secondary distinction can be encoded using priorities.
This way mkdocstrings handlers can return inventory items directly instead of tuples like (identifier, URL)
, that are very hard to evolve.
The inventory code and logic can then be moved to autorefs, which mkdocstrings and handlers would import.
Describe alternatives you've considered
Not doing so. register_url
can accept a new title
argument, but it's hard to pass it from mkdocstrings and handlers because they currently yield two-tuples, and changing that is cumbersome, and it will be cumbersome everytime we want to store additional info in autorefs (domain, role, etc.).
Additional context
Once such a feature is implemented, we could start thinking about syntax to specify cross-ref properties (domain, role). The obvious candidate is attr_list
: [Some title][some-identifier]{ domain="py" role="method" }
.