Skip to content

Commit 0342d4e

Browse files
authored
Merge branch 'main' into become-a-developer-affections-to-affecting
2 parents eda5e6d + 22519c5 commit 0342d4e

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

doc/source/_static/js/download.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Force download for .ipynb links instead of rendering them in the browser.
2+
document.addEventListener("DOMContentLoaded", function () {
3+
document.querySelectorAll('a[href$=".ipynb"]').forEach(function (link) {
4+
link.setAttribute("download", "");
5+
});
6+
});

doc/source/changelog/1033.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Download example files

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"css/search.css",
8484
"css/datatable.css",
8585
]
86-
html_js_files = []
86+
html_js_files = ["js/download.js"]
8787

8888
# disable including and linking the reST sources in HTML builds
8989
html_copy_source = False

0 commit comments

Comments
 (0)