{%- extends 'rst.tpl' -%} {% macro notebooklink() -%} `View the original notebook on nbviewer `__ {%- endmacro %} {%- block header %} {{ notebooklink() }} {% endblock header -%} {%- block footer %} {{ notebooklink() }} {% endblock footer -%} {% block markdowncell scoped %} {{ cell.source | markdown2rst | replace(".ipynb>", ".html>") }} {% endblock markdowncell %}