-
Notifications
You must be signed in to change notification settings - Fork 126
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
links to source code in the Oscar documentation #588
Comments
I don't think Documenter.jl supports this at this time. And it'd be a bit difficult anyway, because it doesn't know which repository and which commit in that repository the code in question comes from. To be precise: I guess in principle it could be taught to deduced this information, at least in our specific case, but its code simply isn't prepared for this. The source link URLs are computed by this code: # When a source link is available then print the link.
if !ctx.settings.disable_git
url = Utilities.url(ctx.doc.internal.remote, ctx.doc.user.repo, result)
if url !== nothing
push!(ret.nodes, a[".docs-sourcelink", :target=>"_blank", :href=>url]("source"))
end
end So this delegates to the url(remote, repo, doc) = url(remote, repo, doc.data[:module], doc.data[:path], linerange(doc))
function url(remote, repo, mod, file, linerange)
file === nothing && return nothing # needed on julia v0.6, see #689
remote = getremote(dirname(file))
isabspath(file) && isempty(remote) && isempty(repo) && return nothing
... |
Documenter.jl 1.0 was just released. Its changelog states among other things:
I have no idea how that works exactly, but it might be worth it having another look at this. |
#2927 handles the update to Documenter.jl v1.0, but skips handling this issue / everything with cross-references to keep the PR small and understandable. |
The Oscar documentation does currently not contain all links from docstrings to the source code.
The links seem to be missing for docstrings that belong to AA, Nemo, and Hecke.
(Note that the files in question get copied into the Oscar repository when the documentation gets built,
and then it is not clear to which addresses one should point for the source code.)
Is there an easy trick that would allow Documenter.jl to find the source code?
The text was updated successfully, but these errors were encountered: