enthought / chaco

Chaco is a Python package for building interactive and custom 2-D plots.
http://docs.enthought.com/chaco/
Other
292 stars 99 forks source link

Don't link to examples on the main branch in documentation #816

Closed rahulporuri closed 3 years ago

rahulporuri commented 3 years ago

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, the 5.0.0 tag will be used instead of the main 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 the 5.0.0 tree instead of main.

Note that this commit also creates the new github-demo external link using the extlinks 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.

mdickinson commented 3 years ago

the examples links will be broken as expected as the dev version has no corresponding tag on GitHub

This makes me wonder whether this is really the right thing to do.