spatialaudio / nbsphinx

:ledger: Sphinx source parser for Jupyter notebooks
https://nbsphinx.readthedocs.io/
MIT License
441 stars 129 forks source link

JavaScript loading issue while offline browsing #799

Open o5x opened 1 month ago

o5x commented 1 month ago

Hi, by trying to use nbsphinx on an offline computer, I've noticed the documentation was really slow to load.

After debugging I've noticed that the generated html documentation is trying to load tex-mml-chtml.js and require.min.js which are not stored locally.

Hence when browsing the documentation offline, it is trying to fetch these JavaScript files for a minute, to finally return an error and show the doc.

Is it possible to make these resources local ? I haven't checked in the code but there could be more links like these when using other features.

I also could not find a workaround to fix it unless I remove these scripts sources manually.

Thanks.

mgeier commented 1 month ago

https://www.sphinx-doc.org/en/master/usage/extensions/math.html#confval-mathjax_path https://nbsphinx.readthedocs.io/en/0.9.3/configuration.html#nbsphinx_requirejs_path

o5x commented 1 month ago

https://www.sphinx-doc.org/en/master/usage/extensions/math.html#confval-mathjax_path https://nbsphinx.readthedocs.io/en/0.9.3/configuration.html#nbsphinx_requirejs_path

It is actually working, it's unlucky that require.min.js is not automatically included, maybe there is a reason behind that.

Thank you