Don't link to examples on the main branch in documentation #816
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.
At the moment, the documentation links to examples on the
main
/default branch. This isn't right because the examples might change in between releases, potentially confusing users who are referring to the documentation. This PR fixes that problem by making the documentation use version-specific links i.e. for the 5.0.0 release, the5.0.0
tag will be used instead of themain
branch.I tested this locally by checking the links generated in the built docs - the examples links will be broken as expected as the dev version has no corresponding tag on GitHub. I then hardcoded the version in the sphinx configuration to
5.0.0
and the links worked as expected, pointing to the5.0.0
tree instead ofmain
.Note that this commit also creates the new
github-demo
external link using theextlinks
sphinx extension. This is how we create the version-specific links in this PR and this is what we do in other ETS projects.Note also that this PR also fixes broken links in the annotated examples page of the documentation.