danielfrg / mkdocs-jupyter

Use Jupyter Notebook in mkdocs
https://mkdocs-jupyter.danielfrg.com
Apache License 2.0
402 stars 49 forks source link

Include widget states in `notebook.html.j2` #195

Closed ozekik closed 7 months ago

ozekik commented 7 months ago

Thank you for working on the amazing project!

This pull request modifies the footer block in the notebook.html.j2 template to include widget states in the exported HTML, which I found required to embed Jupyter Widgets in the HTML properly. (include_requirejs must be enabled as well.)

The code is just a port from the original base.html.j2 of nbconvert: https://github.com/jupyter/nbconvert/blob/89de373448477b963729fe62a43bbc4bcffcdad9/share/templates/lab/base.html.j2#L323-L331

danielfrg commented 7 months ago

thank you!!