-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails after updating to Sphinx 3.5.1 #68
Comments
Hi ! I have the same problem. But I fix it. I can't found I have resolved it:
Check if it works for you! I will try to find why isn't downloaded automatically, or create a PR advertising of that on Good luck! |
Yeah we did the same in last but instead of downloading the js file i am rendering it directly https://searchfox.org/mozilla-central/source/docs/conf.py#77 , earlier we used to have this post script to render on every page https://phabricator.services.mozilla.com/D105674 |
I guess in the latest Sphinx 3.5.1 they removed some functionality i am not sure though thats why sphinx is not able to find mermaid script in |
I've just committed a patch among a set of basic unit tests (finally!). Published 0.6.3 @gil-obradors you were right, that was the problem but needed to do that not in the setup nor the actual node handler but in a special function called via "html-page-context" signal (doing it in the setup makes the tests with conf overrides to fail). I'm no sure if I've just broke compatibility with not so old sphinx versions I'd happily accept a PR to fix it if so). |
I think I'm getting the same javascript error: I'm using sphinxcontrib-mermaid v0.6.3 and sphinx v3.5.2 (though this also failed on 3.4.3 before I upgraded). I had stumbled upon the solution outlined by @gil-obradors , which allowed things to work locally, but ultimately failed when I pushed to readthedocs. |
I'm on |
In Production, same happening with me, I am getting same error as @iancze |
Seeing the same issue here |
If the js script is local, the initialization code is inserted before the actual `mermaid.(min.)js` include which makes the init script error with `mermaid is undefined`. According to: https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_js_file The default prioirty for `app.add_js_file` is 500, while the default priority of `html_js_files` is 800. A different solution would be to pass the path to the local mermaid.js to this plugin and have it insert it at the right time but I am not familiar enough with this code base to make that change
Fix #68 by setting mermaid init JS priority
Mermaid graphs are not rendering https://firefox-source-docs.mozilla.org/tools/moztreedocs/mermaid-integration.html after upgrading to 3.5.1 we are getting this errro
Uncaught ReferenceError: mermaid is not defined
The text was updated successfully, but these errors were encountered: