Skip to content
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

[cherry-pick] Enhance UX on TorchAudio pages to improve awareness of doc versioning… #3267

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

carljparker
Copy link
Contributor

… (#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: #3167

Reviewed By: mthrok

Differential Revision: D44112224

Pulled By: carljparker

fbshipit-source-id: e76f5cb6734a784d161342964459577aa9b64cac

…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
@carljparker carljparker requested a review from mthrok April 17, 2023 19:11
@mthrok mthrok merged commit 701239f into pytorch:release/2.0 Apr 24, 2023
@mthrok
Copy link
Collaborator

mthrok commented Apr 24, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants