-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bugfixes to Documenter config, docs links #166
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the latest GH run i still see this warning. (and the other invalid local links) |
bors try |
tryBuild succeeded: |
I was misunderstanding the problem in the earlier version of this PR -- this should be completely fixed. |
LGTM! Just need to merge from |
odunbar
approved these changes
Jul 7, 2022
tsj5
changed the title
[WIP] Documentation bugfix
Bugfixes to Documenter config, docs links
Jul 20, 2022
bors r+ |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes two separate bugs which raise warnings when building documentation, as described in issue #167. Thanks to @charleskawczynski for helping me debug this issue!
The first bug is that relative paths are not supported as targets of Documenter
@ref
links (Documenter issue 509 -- I think the link is generated correctly but doesn't pass the linkcheck stage, but don't quote me on that.)The fix implemented here is the same as what was used for the julialang docs: the link targets are explicitly marked with an
@id
tag, and the@ref
tag is changed to refer to that@id
tag, rather than the file's path.Ironcially, this could be better documented in the Documenter docs themselves...
The second bug only takes place when building docs locally, and results in missing file warnings for files that exist. This is due to Literate.jl, which generates non-functional URLs (containing the string
<unkown>
) if the config variablerepo_root_url
is not set. Literate.jl's default configuration picks this up correctly when run under common CI services (eg. GH Actions), but not when built locally.The fix implemented here is to manually set this path in make.jl only when being run outside of CI (which we test for by testing the existence of a shell environment variable named
CI
).With the two fixes above, documentation builds locally without raising any warnings, and manually checking confirms the links in question are generated correctly.