cuda-python icon indicating copy to clipboard operation
cuda-python copied to clipboard

Switch to use nvidia-sphinx-theme

Open leofang opened this issue 1 year ago • 3 comments

It's finally up on PyPI now: https://pypi.org/project/nvidia-sphinx-theme

leofang avatar Nov 06 '24 00:11 leofang

I find it annoying that if we have past doc versions, all versions need to be rebuilt with the new theme... @szkarpinski I will have to peek how you did it for nvmath and other projects 😛

leofang avatar Nov 14 '24 04:11 leofang

all versions need to be rebuilt with the new theme...

@leofang do they? We didn't do it for DALI or nvmath. For example see the DALI docs - when you choose version <=1.38 in the switcher, you just get redirected to the docs in the old RTD theme.

szkarpinski avatar Nov 14 '24 10:11 szkarpinski

Yes, but it's poor UX, because the different themes look up the version json files in different places, and the file format requirements are different too. For example, if you switch to DALI 1.38 version (the last version using the old RTD theme), there's no way to select any newer versions through the version drop-down menu (except for picking main, we might argue). If we're OK with this then it is indeed straightforward as you said.

leofang avatar Nov 14 '24 16:11 leofang

@copilot please work on this:

  • This repo has multiple places (cuda components) that have sphinx conf.py. Be sure to update all of them.
  • The nvidia-sphinx-theme is derived from the pydata-sphinx-theme, so when in doubt you can look up the latter's docs. (I don't think we have the nvidia theme's docs available in the public.)
  • The versioned doc support (#95, #165) needs update.
    • the json files probably need to be transformed into a different format
    • some JavaScripts that I added to hack the current theme can be removed now

leofang avatar Aug 21 '25 02:08 leofang