-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
at-ref to functions in other packages #688
Comments
Why would you not want an error message for broken links? |
Ideally, I would want these links to work, ie point to other documentation (happy to specify the package => base url mapping manually), but from #425 it is my impression that this is not going to happen for a while. So silencing them would be OK, too, so that other relevant errors don't get lost in the noise. |
For docstring references it would not be enough though -- you'd still have to build the docs for that package to figure out which manual page the docstring ends up on. But it would be a neat feature, so ideas are welcome -- I think #425 could be reopened. One option would be that |
Something like this already works, or did you have something else in mind?
|
I was thinking something like But yeah, it does not help with exact references to different docstrings. Full URLs like that is what you can do right now, as you say. |
As for silencing: not a good idea to just silence all unresolved links, I think, since it would hide typos etc. But could maybe consider having the option to define a list of modules for which, if Documenter sees that a docstring (or maybe even just the corresponding name) exists, we would not throw a message. So, maybe something like |
I think it would be great if symbol => relative_url_with_anchor mappings. Then, when another package wanted to refer to docstrings in this package, one would simply specify something like makedocs(...,
ref_external_packages = Dict("Foo" => "https://foodocs.github.io/Foo.toml")) |
Yes, something along those lines could be an option. Static links will get out of date though, but Documenter could to maintain a single HTML page in each doc build that would resolve internal links. E.g. |
For future reference: Sphinx is able to something like this with the intersphinx extension, so could be a source of inspiration for an implementation. |
Any update on this? Can't we have a repository container similar to what @tpapp mentioned? What are the requirements that block this? To start, we can implement a simple solution. Having something like: "Foo" => "https://foodocs.github.io/Foo" and referencing a doc with
or we can just use the first result from:
|
I'm not such a fan of static links in cases where a better approach might be possible. For those who haven't seen, Pkg devs have taken the really cool step of decoupling packages from git repos; now you can host multiple packages in a single git repository. I will not be surprised if, a year or two from now, many of our biggest ecosystems are using this capability. It would be nice to at least have dynamic links to other packages in the same repo, so that for people who build the docs locally, following links takes you to your local version rather than an outdated hosted copy. |
I would strongly support
For the inventory file, we could just adopt the format used by InterSphinx. I have detailed this in #2366. It offers the added benefit that we would be able to bi-directionally link between any Julia and any Python project (any project using Documenter and any project using Sphinx). |
DocumenterInterLinks.jl is now available, although still experimental. |
Closed by #2424 and the existence of the |
From #425 it is my impression that references like
are unsupported. Is this correct?
However I still think that this is the best way to refer to other packages in docstrings, and I am wondering if at least I could silence the error messages along the lines of
The text was updated successfully, but these errors were encountered: