diff --git a/docs/api_examples/template_path/make_html.py b/docs/api_examples/template_path/make_html.py index 606dc4d07..40e2fb7a2 100644 --- a/docs/api_examples/template_path/make_html.py +++ b/docs/api_examples/template_path/make_html.py @@ -1,5 +1,7 @@ """ this script builds html files with either classic or classic_clone templates + +Note: nbconvert 6.1 changed ``template_path`` to ``template_paths`` """ import nbformat from traitlets.config import Config @@ -9,7 +11,7 @@ the_ipynb = nbformat.read(nbfile, as_version=4) c = Config() -c.TemplateExporter.template_path = ['.', './project_templates'] +c.TemplateExporter.template_paths = ['.', './project_templates'] for template in ['classic', 'classic_clone']: c.HTMLExporter.template_name = template html_exporter = HTMLExporter(config=c) diff --git a/docs/source/external_exporters.rst b/docs/source/external_exporters.rst index cb089b9f2..ec4183a11 100644 --- a/docs/source/external_exporters.rst +++ b/docs/source/external_exporters.rst @@ -188,12 +188,14 @@ We are going to write an exporter that: return '.test_ext' @property - def template_path(self): + def template_paths(self): """ We want to inherit from HTML template, and have template under ``./templates/`` so append it to the search path. (see next section) + + Note: nbconvert 6.1 changed ``template_path`` to ``template_paths`` """ - return super().template_path+[os.path.join(os.path.dirname(__file__), "templates")] + return super().template_paths+[os.path.join(os.path.dirname(__file__), "templates")] def _template_file_default(self): """