ipython/ipython — pull request #3535 by jakevdp (2013-07-04 14:22:06+00:00)
Title: allow custom template paths in exporter

This PR adds a keyword to the nbconvert ``Exporter`` class so that a user can define their own template that extends one of the basic templates included in the distribution. The syntax looks like this:

``` python
exportHTML = BasicHTMLExporter(user_template_path='/abs/path/to/my/templates',
template_file='mytemplate.tpl')
```

Ant the user-defined template might look something like:
```
{%- extends 'basichtml.tpl' -%}

{% block body %}

{{ super() }}

{%- endblock body %}
```

Because the default path is not overridden with this new option, it allows the user-defined templates to extend the built-in templates using a simple "extends" block. This would result in the same output as the `basichtml` template, but wrapped with custom div tags.