Skip to content

Commit 55c4809

Browse files
committed
DOC: Add download link for executed .ipynb file
1 parent ff9f09b commit 55c4809

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<a class="reference external" href="https://github.com/spatialaudio/nbsphinx/blob/{{ env.config.release|e }}/{{ docname|e }}">{{ docname|e }}</a>.
5151
Interactive online version:
5252
<span style="white-space: nowrap;"><a href="https://mybinder.org/v2/gh/spatialaudio/nbsphinx/{{ env.config.release|e }}?filepath={{ docname|e }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a>.</span>
53+
<a href="{{ env.docname.split('/')|last|e + '.ipynb' }}" class="reference download internal" download>Download notebook</a>.
5354
<script>
5455
if (document.location.host) {
5556
let nbviewer_link = document.createElement('a');
@@ -59,7 +60,7 @@
5960
window.location.host +
6061
window.location.pathname.slice(0, -4) +
6162
'ipynb');
62-
nbviewer_link.innerHTML = 'View in <em>nbviewer</em>';
63+
nbviewer_link.innerHTML = 'Or view it on <em>nbviewer</em>';
6364
nbviewer_link.classList.add('reference');
6465
nbviewer_link.classList.add('external');
6566
document.currentScript.replaceWith(nbviewer_link, '.');

0 commit comments

Comments
 (0)