diff --git a/docs/source/_static/js/theme.js b/docs/source/_static/js/theme.js index 2b23c856d49..5c7c27f82b1 100644 --- a/docs/source/_static/js/theme.js +++ b/docs/source/_static/js/theme.js @@ -946,7 +946,7 @@ if (downloadNote.length >= 1) { tutorialUrlArray[0] = tutorialUrlArray[0] + "/sphinx-tutorials" var githubLink = "https://github.com/pytorch/rl/blob/main/" + tutorialUrlArray.join("/") + ".py", - notebookLink = $(".reference.download")[1].href, + notebookLink = $(".sphx-glr-download-jupyter").find(".download.reference")[0].href, notebookDownloadPath = notebookLink.split('_downloads')[1], colabLink = "https://colab.research.google.com/github/pytorch/rl/blob/gh-pages/main/_downloads" + notebookDownloadPath; diff --git a/docs/source/_static/js/torchrl_theme.js b/docs/source/_static/js/torchrl_theme.js index 05e1a5b7a63..dc4588cdfa7 100644 --- a/docs/source/_static/js/torchrl_theme.js +++ b/docs/source/_static/js/torchrl_theme.js @@ -945,7 +945,7 @@ if (downloadNote.length >= 1) { var tutorialUrlArray = $("#tutorial-type").text().split('/'); var githubLink = "https://github.com/pytorch/rl/tree/tutorial_py_dup/sphinx-tutorials/" + tutorialUrlArray[tutorialUrlArray.length - 1] + ".py", - notebookLink = $(".reference.download")[1].href, + notebookLink = $(".sphx-glr-download-jupyter").find(".download.reference")[0].href, notebookDownloadPath = notebookLink.split('_downloads')[1], colabLink = "https://colab.research.google.com/github/pytorch/rl/blob/gh-pages/_downloads" + notebookDownloadPath; diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html index 543edfac202..7babfdd1ab0 100644 --- a/docs/source/_templates/layout.html +++ b/docs/source/_templates/layout.html @@ -61,7 +61,7 @@ if (downloadNote.length >= 1) { var tutorialUrl = $("#tutorial-type").text(); var githubLink = "https://github.com/pytorch/rl/blob/main/tutorials/sphinx-tutorials/" + tutorialUrl + ".py", - notebookLink = $(".reference.download")[1].href, + notebookLink = $(".sphx-glr-download-jupyter").find(".download.reference")[0].href, notebookDownloadPath = notebookLink.split('_downloads')[1], colabLink = "https://colab.research.google.com/github/pytorch/rl/blob/gh-pages/main/_downloads" + notebookDownloadPath;