Tell Documenter where symbols are imported from

I want to organize my modules so that, among other things, when a user does import MainMod.A at the REPL, and then A.[TAB] they see to the extent possible, only symbols in the API. So I want to put the ugly code and the pretty code in modules with ugly names and then import only the pretty function names to an API module with a pretty name.

I want Documenter to show only the pretty path to the symbol. But it seems to always show the name of the module where the doc string is defined.

For example:

modA.jl

module A

import .._A: foo

end # module A

mod_A.jl

module _A
"""
    foo()

The foo function does things.
"""
foo() = _foo_helper()

_foo_helper()  = 1
end # module _A
  • Is there a facility in Documenter to support this?
  • If not, Is there a trick to do it?
  • I’d still want a link to the API code in the ugly module; not a link to the line that imports into the pretty module. This would be more complicated.
  • I can move the doc strings to the pretty module (I’m pretty sure). I can even move the functions in the API to the pretty module along with the doc string. The latter would then work fine with Documenter. This might be a good solution sometimes. But having doc strings close to the code, and API functions close to helper functions, is sometimes preferable.