Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/source/_static/js/download.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Force download for .ipynb links instead of rendering them in the browser.
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll('a[href$=".ipynb"]').forEach(function (link) {
link.setAttribute("download", "");
});
});
1 change: 1 addition & 0 deletions doc/source/changelog/1033.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Download example files
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"css/search.css",
"css/datatable.css",
]
html_js_files = []
html_js_files = ["js/download.js"]

# disable including and linking the reST sources in HTML builds
html_copy_source = False
Expand Down
Loading