How to hide code cells and add custom css to jupyter notebooks?

335 Views Asked by At

I am using HTMLExporter from nbconvert to execute jupyter notebooks from the python scripts. I already checked stack overflow but did not find any solution on how to add a custom template for custom css and collapsible cells. This is the code I am using to convert notebooks to html:

exportHtml = HTMLExporter(config=ConfigParser({
    'HTMLExporter':{'default_template':'basic'}
}))
body, resources = exportHtml.from_notebook_node(nb)
Html_file= io.open('Test.html', 'w',encoding='utf-8')
Html_file.write(body)
Html_file.close()

Please help on how to use custom templates.

0

There are 0 best solutions below