[cherry-pick] Enhance UX on TorchAudio pages to improve awareness of doc versioning… #3267
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.
… (#3167)
Summary:
breadcrumbs.html
in_templates
overrides Sphinx version.I create a new variable in
conf.py
, version_stable, which has the version number for the most-recent stable release. I define this variable in the html_context dictionary so that it is visible to the templates.I use this approach because I was not able to find any other way of discerning the current stable release during the build. Note that the
versions.html
file--which identifies the current stable release--appears to be available only in the gh-pages branch and so it is not available at build time.However, this means that someone will need to update
conf.py
whenever the current stable release changes.Pull Request resolved: #3167
Reviewed By: mthrok
Differential Revision: D44112224
Pulled By: carljparker
fbshipit-source-id: e76f5cb6734a784d161342964459577aa9b64cac