Template Outline ExampleΒΆ

{%- extends 'display_priority.tpl' -%}

@ipubreplace{below}{globals}

%% HTML Setup
%% ====================

{%- block header %}<!-- 
An html document created by ipypublish @ipubreplace{below}{ipypub_version}
@ipubreplace{below}{meta_docstring}
-->

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
{%- block html_head -%}
    @ipubreplace{below}{html_header}
{%- endblock html_head -%}
</head>
{%- endblock header -%}

{% block body %}
 <body>
 @ipubreplace{below}{html_body_start}
 {{ super() }}
 @ipubreplace{below}{html_body_end}
 </body>
{%- endblock body %}

{%- block footer %}
    @ipubreplace{below}{html_footer}
</html>
{%- endblock footer-%}

%% Notebook Input
%% ==============

{%- block any_cell scoped %}
@ipubreplace{below}{notebook_all}
{% endblock any_cell %}

{% block input_group -%}
@ipubreplace{above}{notebook_input_code_pre}
{{ super() }}
@ipubreplace{below}{notebook_input_code_post}
{% endblock input_group %}

{% block in_prompt -%}
@ipubreplace{below}{notebook_input_code_prompt}
{%- endblock in_prompt %}

{% block input scoped %}
@ipubreplace{below}{notebook_input_code}
{% endblock input %}

{% block rawcell scoped %}
@ipubreplace{above}{notebook_input_raw_pre}
@ipubreplace{below}{notebook_input_raw}
@ipubreplace{below}{notebook_input_raw_post}
{% endblock rawcell %}

{% block markdowncell scoped %}
@ipubreplace{above}{notebook_input_markdown_pre}
@ipubreplace{below}{notebook_input_markdown}
@ipubreplace{below}{notebook_input_markdown_post}
{% endblock markdowncell %}

{% block unknowncell scoped %}
@ipubreplace{above}{notebook_input_unknown_pre}
@ipubreplace{below}{notebook_input_unknown}
@ipubreplace{below}{notebook_input_unknown_post}
{% endblock unknowncell %}

%% Notebook Outbook
%% ================

{% block output %}
@ipubreplace{above}{notebook_output_pre}
@ipubreplace{below}{notebook_output_prompt}
{{ super() }}
@ipubreplace{below}{notebook_output_post}
{% endblock output %}

% Redirect execute_result to display data priority.
{%- block execute_result scoped %}
    {%- set extra_class="output_execute_result" -%}
    {% block data_priority scoped %}
@ipubreplace{below}{notebook_output}
    {% endblock %}
    {%- set extra_class="" -%}
{% endblock execute_result %}

{% block error %}
@ipubreplace{above}{notebook_output_error_pre}
@ipubreplace{below}{notebook_output_error}
@ipubreplace{below}{notebook_output_error_post}
{% endblock error %}

{% block traceback_line %}
@ipubreplace{above}{notebook_output_traceback_pre}
@ipubreplace{below}{notebook_output_traceback}
@ipubreplace{below}{notebook_output_traceback_post}
{% endblock traceback_line %}

{% block data_text %}
@ipubreplace{above}{notebook_output_text_pre}
@ipubreplace{below}{notebook_output_text}
@ipubreplace{below}{notebook_output_text_post}
{% endblock data_text %}

{% block data_latex %}
@ipubreplace{above}{notebook_output_latex_pre}
@ipubreplace{below}{notebook_output_latex}
@ipubreplace{below}{notebook_output_latex_post}
{% endblock data_latex %}


{% block stream_stdout %}
@ipubreplace{above}{notebook_output_stream_stdout_pre}
@ipubreplace{below}{notebook_output_stream_stdout}
@ipubreplace{below}{notebook_output_stream_stdout_post}
{% endblock stream_stdout %}

{% block stream_stderr %}
@ipubreplace{above}{notebook_output_stream_stderr_pre}
@ipubreplace{below}{notebook_output_stream_stderr}
@ipubreplace{below}{notebook_output_stream_stderr_post}
{% endblock stream_stderr %}

{%- block data_markdown -%}
@ipubreplace{above}{notebook_output_markdown_pre}
@ipubreplace{below}{notebook_output_markdown}
@ipubreplace{below}{notebook_output_markdown_post}
{% endblock data_markdown %}

{%- block data_jpg -%}
@ipubreplace{above}{notebook_output_jpg_pre}
@ipubreplace{below}{notebook_output_jpg}
@ipubreplace{below}{notebook_output_jpg_post}
{%- endblock data_jpg -%}

{%- block data_png -%}
@ipubreplace{above}{notebook_output_png_pre}
@ipubreplace{below}{notebook_output_png}
@ipubreplace{below}{notebook_output_png_post}
{%- endblock data_png -%}

{%- block data_svg -%}
@ipubreplace{above}{notebook_output_svg_pre}
@ipubreplace{below}{notebook_output_svg}
@ipubreplace{below}{notebook_output_svg_post}
{%- endblock data_svg -%}

{%- block data_pdf -%}
@ipubreplace{above}{notebook_output_pdf_pre}
@ipubreplace{below}{notebook_output_pdf}
@ipubreplace{below}{notebook_output_pdf_post}
{%- endblock -%}

{% block data_html -%}
@ipubreplace{above}{notebook_output_html_pre}
@ipubreplace{below}{notebook_output_html}
@ipubreplace{below}{notebook_output_html_post}
{% endblock data_html%}

{%- block data_javascript scoped %}
@ipubreplace{above}{notebook_output_javascript_pre}
@ipubreplace{below}{notebook_output_javascript}
@ipubreplace{below}{notebook_output_javascript_post}
{%- endblock -%}

{%- block data_widget_state scoped %}
@ipubreplace{above}{notebook_output_widget_state_pre}
@ipubreplace{below}{notebook_output_widget_state}
@ipubreplace{below}{notebook_output_widget_state_post}
{%- endblock data_widget_state -%}

{%- block data_widget_view scoped %}
@ipubreplace{above}{notebook_output_widget_view_pre}
@ipubreplace{below}{notebook_output_widget_view}
@ipubreplace{below}{notebook_output_widget_view_post}
{%- endblock data_widget_view -%}

%% Jinja Macros
%% ================

@ipubreplace{below}{jinja_macros}