notebook/docs/source/template.tpl

21 lines
544 B
Smarty
Raw Normal View History

{%- extends 'rst.tpl' -%}
{% macro notebooklink() -%}
2017-11-20 21:38:59 +08:00
`View the original notebook on nbviewer <https://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/{{ resources['metadata']['path'] }}/{{ resources['metadata']['name'] | replace(' ', '%20') }}.ipynb>`__
{%- endmacro %}
{%- block header %}
{{ notebooklink() }}
{% endblock header -%}
{%- block footer %}
{{ notebooklink() }}
{% endblock footer -%}
{% block markdowncell scoped %}
{{ cell.source | markdown2rst | replace(".ipynb>", ".html>") }}
2015-06-20 03:03:55 +08:00
{% endblock markdowncell %}