-
Notifications
You must be signed in to change notification settings - Fork 481
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
support computed external links? #1343
Comments
If you just replace it in a preprocess step instead it should not complain. |
Thanks for your reply. |
It would be great if Documenter allowed the user to customize the logic for For JuliaHub we now build and serve most package documentation, and allowing XRef: #319 |
Some sort of a hook into link generation is definitely something we could do, but I feel that this would need to be hashed out a bit more before it's actionable. Another question is whether we want to overload at-ref -- perhaps a dedicated at-link would make more sense? However, for the OPs use case, a plugin might be the way to go. You can basically add another build stage that would expand a custom at-ref for you. You can take a look at the implementation of |
a clean solution to compute external references Preliminary support for computed external references in the documentation of GAP.jl had been proposed in pull request oscar-system#472, but this was of course not satisfactory because it misused Documenter.jl. In the discussion of JuliaDocs/Documenter.jl/issues/1343, @mortenpi suggested to get the required functionality by adding a plugin to Documented.jl, analogous to an implementation of citations by @ali-ramadhan. This works well, and from my point of view the issue JuliaDocs/Documenter.jl/issues/1343 can be closed. Thanks a lot to @mortenpi for the hint, and to @ali-ramadhan for the code. The details of the changes are: - added a plugin for Documenter.jl - replaced the GAP function `UrlOfManualEntry` by `MatchURLs` (thanks to @frankluebeck for this code) - removed the now unnecessary GAP function `ComputeLinksToGAPManuals` and the Julia function `compute_links_to_gap_manuals`
a clean solution to compute external references Preliminary support for computed external references in the documentation of GAP.jl had been proposed in pull request #472, but this was of course not satisfactory because it misused Documenter.jl. In the discussion of JuliaDocs/Documenter.jl/issues/1343, @mortenpi suggested to get the required functionality by adding a plugin to Documented.jl, analogous to an implementation of citations by @ali-ramadhan. This works well, and from my point of view the issue JuliaDocs/Documenter.jl/issues/1343 can be closed. Thanks a lot to @mortenpi for the hint, and to @ali-ramadhan for the code. The details of the changes are: - added a plugin for Documenter.jl - replaced the GAP function `UrlOfManualEntry` by `MatchURLs` (thanks to @frankluebeck for this code) - removed the now unnecessary GAP function `ComputeLinksToGAPManuals` and the Julia function `compute_links_to_gap_manuals`
DocumenterInterLinks.jl should provide a solution to this, although it's still experimental. |
As far as I understand, Documenter.jl supports internal links via
@ref
, and external links via the[text](URL)
syntax, whereURL
must be an explicit address.I am trying to use Documenter.jl for a module that cross-references various entries in the documentation of some other computer system.
The URLs in question may be subject to changes, for example depending on the version number of that system; hard-coded URLs are therefore not a good solution.
At the time when the documentation of the module gets built, these URLs can be computed by a Julia function that belongs to the module.
Would it be possible to extend Documenter.jl such that this kind of computed external links gets supported, or do you have a better idea for this functionality?
Currently I am using the following hack.
Write
[text](url-encode)
in the documentation, let Documenter.jl process it, and add a post-processing step that replaces eachurl-encode
by the computed URL.This works in the final HTML version of the documentation, and looks acceptable in the interactive Julia help. However, Documenter.jl issues warnings about
invalid local link
.The text was updated successfully, but these errors were encountered: