Last active
July 9, 2017 15:49
-
-
Save AustinRochford/4f4e42f997aa97bdade4 to your computer and use it in GitHub Desktop.
The template I use to convert IPython notebooks to markdown for my blog.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'display_priority.tpl' %} | |
{% block in_prompt %} | |
{% endblock in_prompt %} | |
{% block output_prompt %} | |
{%- endblock output_prompt %} | |
{% block input %} | |
```python | |
{{ cell.source }} | |
``` | |
{% endblock input %} | |
{% block error %} | |
{{ super() }} | |
{% endblock error %} | |
{% block traceback_line %} | |
{{ line | indent | strip_ansi }} | |
{% endblock traceback_line %} | |
{% block execute_result %} | |
{% block data_priority scoped %} | |
{{ super() }} | |
{% endblock %} | |
{% endblock execute_result %} | |
{% block stream %} | |
{{ output.text | indent }} | |
{% endblock stream %} | |
{% block data_svg %} | |
 | |
{% endblock data_svg %} | |
{% block data_png %} | |
<center></center> | |
{% endblock data_png %} | |
{% block data_jpg %} | |
 | |
{% endblock data_jpg %} | |
{% block data_latex %} | |
{{ output.data['text/latex'] }} | |
{% endblock data_latex %} | |
{% block data_html scoped %} | |
{{ output.data['text/html'] }} | |
{% endblock data_html %} | |
{% block data_markdown scoped %} | |
{{ output.data['text/markdown'] }} | |
{% endblock data_markdown %} | |
{% block data_text scoped %} | |
``` | |
{{ output.data['text/plain'] }} | |
``` | |
{% endblock data_text %} | |
{% block markdowncell scoped %} | |
{{ cell.source }} | |
{% endblock markdowncell %} | |
{% block unknowncell scoped %} | |
unknown type {{ cell.type }} | |
{% endblock unknowncell %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment