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

Enable multi-level nav in the left nav bar #3125

Merged
merged 17 commits into from
Nov 5, 2024
Merged

Enable multi-level nav in the left nav bar #3125

merged 17 commits into from
Nov 5, 2024

Conversation

svekars
Copy link
Contributor

@svekars svekars commented Oct 29, 2024

  • Override pytorch_sphinx_theme to enable multi-level nav
  • Add the needed CSS to indent the 2nd level to the right
  • Use titlesonly in global_toc
  • Turn introyt.rst to .py for the expansion work correctly.
    How it will work:
Screen.Recording.2024-10-29.at.1.05.53.PM.mov

Copy link

pytorch-bot bot commented Oct 29, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3125

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 81cdebe with merge base a551cdf (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

`Seth Juarez <https://github.com/sethjuarez/>`_,
`Cassie Breviu <https://github.com/cassieview/>`_,
`Cassie Breviu <https://github.com/cassiebreviu/>`_,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cassiebreviu - can you confirm this is the new account that should be listed here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes https://github.com/cassiebreviu/ is correct. Thanks!

@svekars
Copy link
Contributor Author

svekars commented Oct 29, 2024

Linkcheck fails because the link doesn't yet exist. It will exist when this PR is merged

svekars added a commit that referenced this pull request Oct 29, 2024
In some cases, like in this [PR](#3125), we might be adding links in the PR that don't yet exist and that will be added with that current PR. We should have an ability to skip linkcheck for cases like this. 

This PR adds a condition to skip link check if a label skip-link-check is added.
Copy link
Contributor

@janeyx99 janeyx99 left a comment

Choose a reason for hiding this comment

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

image

It'd be good if the concepts under "Learn the Basics" were automatically expanded, to give people an immediate summary of PyTorch basics just by looking at the sidebar. Or if these pages are as they were before + not nested under "Learn the Basics".

beginner_source/introyt/introyt.py Outdated Show resolved Hide resolved
beginner_source/introyt/introyt.py Outdated Show resolved Hide resolved
Running the Tutorial Code
-------------------------
You can run this tutorial in a couple of ways:
This page has been moved.
Copy link
Contributor

Choose a reason for hiding this comment

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

Woah, would this autoredirect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, tested in other pages like this.

@janeyx99
Copy link
Contributor

Let some review on the details--the multilevel nav bar is p cool. If we are only rearranging the sidebar, I think this is an improvement. There is still the greater task of deduplicating the content of the blitz, youtube, and qs basics, which I figure is outside the scope of the PR.

@svekars
Copy link
Contributor Author

svekars commented Oct 30, 2024

It'd be good if the concepts under "Learn the Basics" were automatically expanded, to give people an immediate summary of PyTorch basics just by looking at the sidebar. Or if these pages are as they were before + not nested under "Learn the Basics".

I can add a + sign like this:

Screenshot 2024-10-30 at 4 22 38 PM (2)

@svekars svekars added the skip-link-check Will allow you to skip linkcheck on a PR. Should only should be used when a link can't be fixed. label Nov 4, 2024
Copy link
Contributor

@janeyx99 janeyx99 left a comment

Choose a reason for hiding this comment

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

preview looks alright to me

@svekars svekars merged commit 33753d3 into main Nov 5, 2024
20 checks passed
@svekars svekars deleted the third-nav branch November 5, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed skip-link-check Will allow you to skip linkcheck on a PR. Should only should be used when a link can't be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants