danielfrg / mkdocs-jupyter

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

added custom_mathjax_url option #201

Closed dr-br closed 5 days ago

dr-br commented 1 month ago

Added the option to define a custom mathjax URL.
Not sure if all the modifications are really necessary in the code, please check! It also works with the privacy plugin of mkdocs-material.

Off topic: I'm not able to run the demo, some templates are missing in this repo. If I install mkdocs-jupyter via Pypi, the required template files are present.

danielfrg commented 1 month ago

This lgtm.

could we do a small change to not create a new Exporter and instead do it with a variable, something like:

default_mathjax_url = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS_CHTML-full,Safe"
mathjax_url = custom or default_mathjax_url
danielfrg commented 1 month ago

Maybe even make the default of custom_mathjax_url to be "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS_CHTML-full,Safe"