[IPython-dev] Custom template with nbconvert

Jakob Gager gager at ilsb.tuwien.ac.at
Fri Aug 9 05:52:58 EDT 2013


Thanks Matthias,

I figured out that I had a very unclean installation. Removed everything and reinstalled 1.0
and now it works as expected!

Jakob

On 08/09/2013 11:06 AM, Matthias BUSSONNIER wrote:
>
> Le 9 août 2013 à 10:52, Jakob Gager a écrit :
>
>> Hi,
>>
>> I tried to create a custom nbconvert template to remove the input cells from a notebook when converting
>> the html.
>> My naive approach was to create a file called my_html.tpl which contains only
>> {%- extends 'fullhtml.tpl' -%}
>> {% block input %}
>> {%- endblock input %}
>> now I tried to use it as ipython nbconvert --to html --template my_html.tpl file1.ipynb.
>>
>> However, there seems to be some issue with the registration of the jinja filters as I get an error like
>>
>>    File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/basichtml.tpl",
>
> Are you on 1.0 ? This file shoudl not exist in 1.0.
>
> (and you should inherit html_full.tpl now)
>




More information about the IPython-dev mailing list