pytorch / pytorch_sphinx_theme

PyTorch Sphinx Theme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

NicolasHug opened this issue · 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

article.pytorch-article .sphx-glr-download-link-note.admonition.note,

with possibly these ones too:

// This code replaces the default sphinx gallery download buttons

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