diff --git a/nbconvert/exporters/html.py b/nbconvert/exporters/html.py index 468c1c660..523ea44dd 100644 --- a/nbconvert/exporters/html.py +++ b/nbconvert/exporters/html.py @@ -266,6 +266,8 @@ def from_notebook_node( # type:ignore[explicit-override, override] markdown_collection = markdown_collection + cell.source + "\n" resources = self._init_resources(resources) + print('type:', resources) + resources["tableofcontents"] = extract_titles_from_markdown_input(markdown_collection) filter_data_type = WidgetsDataTypeFilter( @@ -354,8 +356,8 @@ def resources_include_url(name): return markupsafe.Markup(src) resources = super()._init_resources(resources) - if resources is None: - resources = {} + + resources["theme"] = self.theme resources["include_css"] = resources_include_css resources["include_lab_theme"] = resources_include_lab_theme