I am using Jupyter notebooks with jupyter-contrib-nbextensions and I can fold sections as well as code blocks in them. I want to know if there is a way to preserve the folding feature when the notebook is exported to html. Currently when I export to html, I can't fold anything. The notebook becomes cumbersome to handle if it's long, even if there's a table of contents. I'll appreciate any ideas in this regard. Thanks!
Asked
Active
Viewed 1,659 times
2 Answers
2
Interesting need. I briefly looked into this. Looks like the nbextensions don't have that capability. I think there are perhaps two choices, both of which would require quite some work:
- Take the html file and convert it to some form that would allow cascading style sheets and then manually implement folding
- If you are looking to do this repeatedly and have the skills, then you could look at the nbextensions code and try to change it to make it fold
If you find any other options or solutions, post it here.

SanV
- 855
- 8
- 16