-
Notifications
You must be signed in to change notification settings - Fork 664
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
Enhance UX on TorchAudio pages to improve awareness of doc versioning #3167
Enhance UX on TorchAudio pages to improve awareness of doc versioning #3167
Conversation
- Boldface the version-selection UX and increase size by three percent. - Add text to breadcrumbs to indicate version and stability. - New `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.
Hi @carljparker Thanks for the PR. The breadcrumbs looks good. |
@carljparker has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@carljparker merged this pull request in 92f2ea8. |
Hey @carljparker. |
…pytorch#3167) Summary: - Boldface the version-selection UX and increase size by three percent. - Add text to breadcrumbs to indicate version and stability. - New `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: pytorch#3167 Reviewed By: mthrok Differential Revision: D44112224 Pulled By: carljparker fbshipit-source-id: e76f5cb6734a784d161342964459577aa9b64cac
…#3167) (#3267) Summary: - Boldface the version-selection UX and increase size by three percent. - Add text to breadcrumbs to indicate version and stability. - New `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
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.