JuliaDocs / DocumenterInterLinks.jl

A plugin for Documenter.jl that enables linking between projects
http://juliadocs.org/DocumenterInterLinks.jl/
MIT License
21 stars 1 forks source link

Add `alias_methods_as_function=true` #7

Closed goerz closed 3 months ago

goerz commented 3 months ago

This adds the keyword argument alias_methods_as_function to InterLinks (true by default) which adds function aliases for method items in any inventory that is loaded. An alias is only created if it is unambiguous, i.e., if there is only a single documented method for a function and no existing docstring for the function.

The feature is to work around Documenter's @autodocs inserting method docstring instead of function docstrings and the fact that method docstrings can be exceedingly verbose to reference in an @extref. With the alias, an @extref can be, e.g.,

 [`Documenter.Selectors.dispatch`](@extref)

instead of the verbose

[`Documenter.Selectors.dispatch`](@extref `Documenter.Selectors.dispatch-Union{Tuple{T}, Tuple{Type{T}, Vararg{Any}}} where T<:Documenter.Selectors.AbstractSelector`)

that would be necessary without alias_method_as_function=false.