pytorch_sphinx_theme icon indicating copy to clipboard operation
pytorch_sphinx_theme copied to clipboard

The theme hides links to notebook in the sphinx-gallery examples

Open NicolasHug opened this issue 4 years ago • 0 comments

We have recently introduced a gallery of examples from sphinx-gallery in the torchvision docs

Normally, there should be a link on every example saying "Download Jupyter notebook:..." which is automatically generated by sphinx-gallery.

Unfortunately the pytorch_sphinx_theme seems to re-style those links with custom code but this only works for the tutorial repo. In the other repos, the links are deactivated: you can see that there's no link in this example, yet the html code exists, it's just being hidden by some CSS.

I believe that the offending lines are these

https://github.com/pytorch/pytorch_sphinx_theme/blob/0efb4da5030c0462a5493a3db6b80317116d6c3e/pytorch_sphinx_theme/static/css/theme.css#L10956

with possibly these ones too:

https://github.com/pytorch/pytorch_sphinx_theme/blob/0efb4da5030c0462a5493a3db6b80317116d6c3e/js/theme.js#L245

and

https://github.com/pytorch/pytorch_sphinx_theme/blob/master/pytorch_sphinx_theme/layout.html#L275

Unfortunately my web dev skills are very weak so I'm unable to address this myself, but it would be very valuable to our users to have those links to the notebooks in the examples.

CC @brianjo @holly1238

NicolasHug avatar May 14 '21 18:05 NicolasHug