mersinvald / aquamarine

Inline diagrams for rustdoc with mermaid.js
MIT License
487 stars 25 forks source link

Use local version of mermaid.min.js #4

Closed vincentdephily closed 3 years ago

vincentdephily commented 3 years ago

The generated html currently fetches mermaid.min.js from a cdn on the internet, which is best practice in some contexts but is I think the wrong default in this case : rustdocs can normally be generated and viewed offline. They should also be impervious to API or url changes 10 years down the road, firewalls, etc.

I think that mermaid.min.js should be saved alongside sidebar-items.js. Not sure if there's a rustdoc naming convention to adhere to (like "cratename.crateversion.normalname") to avoid conflicts with a similar tool.

mersinvald commented 3 years ago

Agreed, I'll see how that can be achieved, thanks for the proposal

mdaj06 commented 3 years ago

@mersinvald can i take a look at this? i am pretty new to the Rust ecosystem

mersinvald commented 3 years ago

@mdaj06 absolutely, I'll be very grateful if you do :)