Create a base template for the notebook.


In [4]:
from IPython import get_ipython

In [8]:
%%file base.html
{% extends "full.tpl" %}
{% block header %}{{super()|replace('<title>build_nbconvert_templates</title>', '<title></title>')}}{% endblock %}
{% block body %}{% raw %}{{content}}{% endraw %}{% endblock %}


Overwriting base.html

In [9]:
!jupyter nbconvert --to html build_nbconvert_templates.ipynb --template=base.html --output=../_layouts/base.html


[NbConvertApp] Converting notebook build_nbconvert_templates.ipynb to html
[NbConvertApp] Writing 247945 bytes to ../_layouts/base.html

In [7]:
%%file body.html
{% extends "full.tpl" %}
{% block header %}---
layout: base
---
{% endblock %}


Overwriting body.html

In [ ]: