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

Allow the user to select the version of the docs #17434

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dimitri-tenstorrent
Copy link
Contributor

@dimitri-tenstorrent dimitri-tenstorrent commented Jan 31, 2025

Ticket

#17433

Problem description

The users would like to see the documentation for several past versions but we currently only build the documentation for the latest commit on main.

What's changed

  1. Added a UI selector to be able to switch between version of the documentation
    The versions of the documentation are stored in https://github.com/tenstorrent/tt-metal/blob/dimitri/test-versioned-docs/docs/published_versions.json

The UI selector makes the HTTP request to get the list of the possible versions and adds the versions to the list for the user to select.

This required a change to the _layout.html for both ttnn and tt-metalium.

The deployment of Github pages (what we currently use to host documentation) needs to change to be done from the branch gh-pages. This is needed so that we store previous documentation and only add new versions to the branch as folders.

The proposed folder structure (e.g.):

v0.55.0/ttnn/index.html
v0.54.0/tt-metalium/index.html

We will need to change the settings for Github pages to be similar to the image below:

Screenshot 2025-01-31 at 1 24 50 PM
  1. We also need to adjust the package workflow to pass the version number to the docs building workflow and use a different Github actions to publish the folder.

Checklist

  • Prefill the gh-pages branch with 3 versions of documentation: 55, 54, and 53
  • Switch the population of latest in the workflow
  • Flip the setting in the Github pages config (test with @tt-rkim )
  • Post commit CI passes
  • Blackhole Post commit (if applicable)
  • Model regression CI testing passes (if applicable)
  • Device performance regression CI testing passes (if applicable)
  • (For models and ops writers) Full new models tests passes
  • New/Existing tests provide coverage for changes

</div>

<script>
const VERSIONS_URL = 'https://raw.githubusercontent.com/tenstorrent/tt-metal/refs/heads/dimitri/test-versioned-docs/docs/published_versions.json';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to change this to main branch

@dimitri-tenstorrent dimitri-tenstorrent marked this pull request as ready for review February 2, 2025 00:31
@dimitri-tenstorrent dimitri-tenstorrent requested a review from a team as a code owner February 2, 2025 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant