Skip to content

Template inheritance from another template in the same directory? #1441

@BoPeng

Description

@BoPeng

I am trying to convert my previous templates to the new template system. I have

sos-full/
    conf.json (base_template: "classic")
    index.html.j2. ( extends "classic/index.html.j2")
sos-cm/
    conf.json (base_template: "sos-full")
    index.html.j2 (extends "sos-full/index.html.j2")

command

jupyter nbconvert source.ipynb --to html \
--TemplateExporter.extra_template_basedirs=/path/to/templates \
--template sos-full

works but

jupyter nbconvert source.ipynb --to html \
--TemplateExporter.extra_template_basedirs=/path/to/templates \
--template sos-cm

yields an error

    {% extends 'sos-full/index.html.j2' %}
jinja2.exceptions.TemplateNotFound: sos-full/index.html.j2

Did I do anything wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions