Closed belfagor93 closed 1 year ago
Thank you for your contribution! This is very appreciated.
Apparently mkdocs can't find your downloaded library. It seems that you must use a relative path to the docs directory:
See:
The doc does not say whether absolute paths are allowed. If you really want to, I would either ask the question to the mkdocs team (or else try to figure out what the code is doing).
@fralau
Thanks for the answer. Unfortunately I just tried to move the file into docs/ or into docs/javascript and give in the mkdocs.yml the relative path but again, no error, no problems:
extra_javascript:
- docs/javascript/mermaid.min.js
INFO - MERMAID2 - Initialization arguments: {}
INFO - MERMAID2 - Explicit mermaid javascript library:
docs/mermaid.min.js
but the website still have the wrong render for the diagrams.
Remove the reference to docs/
?
putting the file under docs/
folder only and removing the reference from the mkdocs.yml is working!
do you think that is something that I should add in the readme and open a PR?
Well, if you omit the reference in the mkdocs.yml file, it inserts the https call to the javascript library on its own! If you look at the generated code html/css, it's probably not what you want.
In the repository, look at the test directory; there are examples of calls to local javascript files in the mkdocs.yaml
file.
Hello,
I'm trying to use mkdocs-mermaid2-plugin in an air-gapped system and I get errors because the plugin is trying to download from the internet https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js.
I tried to save the content of https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js in a local
mermaid.min.js
file but unfortunately, if I pass it in this way:the website will be published but without the proper image display:
I'm using python:3.10-buster with these requirements:
Can someone help me with the air-gapped scenario?