You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, I define only one docstring per function, and it is not necessary to encode the type information in the URL.
Feature request: An option to generate simple URLs that look like this instead of the above: https://sunnysuite.github.io/Sunny.jl/dev/library.html#Sunny.set_pair_coupling!
If that's not possible, then maybe a workaround is to put docstrings on function stubs like so:
To add a bit of background: Documenter has both function docstrings and method docstrings as separate categories. The function docstring is the concatenation of the method docstrings. When you use an explicit @docs block, you can choose which one you want. As explained in the documentation, if you do
```@docs
set_pair_coupling!
```
you get a function docstring, but if you do something like
The "issue" is that @autodocs expands into a list of method docstrings, not function docstrings. This isn't documented behavior, so I'm not sure how intentional it is. My choice would have been to default to function docstrings. I suppose the drawback of that is that you then can't like to a specific method with @ref.
But anyway, I don't see any reason that @autodocs couldn't have an option to switch between expanding to method docstrings and function docstrings, so presumably an PR that adds such an option would be welcome.
I do agree that the long URLs generated by the current @autodocs block are somewhat annoying. It's one reason I don't use @autodocs, personally, but use my own project-specific generate_api.jl scripts to generate Markdown documents with @docs blocks. Also, in the context of DocumenterInterLinks I added a workaround that at least allows to avoid the long method specifications for @extref links.
Is there a way to get simple URLs to docstrings created with @autodocs? For example, this URL is very long because it encodes all type information:
https://sunnysuite.github.io/Sunny.jl/dev/library.html#Sunny.set_pair_coupling!-Union{Tuple{N},%20Tuple{System{N},%20AbstractMatrix,%20Any}}%20where%20N
In my case, I define only one docstring per function, and it is not necessary to encode the type information in the URL.
Feature request: An option to generate simple URLs that look like this instead of the above:
https://sunnysuite.github.io/Sunny.jl/dev/library.html#Sunny.set_pair_coupling!
If that's not possible, then maybe a workaround is to put docstrings on function stubs like so:
The text was updated successfully, but these errors were encountered: