badboy / mdbook-mermaid

A preprocessor for mdbook to add mermaid support
Mozilla Public License 2.0
306 stars 32 forks source link

Making use of CDN #41

Closed steinemann closed 7 months ago

steinemann commented 7 months ago

Hi,

I am struggling with using this plugin currently because, I don't like to put the ~3MB large mermaid.min.js into my repo, as discribed in the installation instructions.

Is there a way to make use of the CDN network and just use the corresponding mermaid.min.js file from there on client side ?

E.g. https://www.jsdelivr.com/package/npm/mermaid

Thanks, Peter

badboy commented 7 months ago

Sure, in your book.toml replace the path in additional-js with the URL to the CDN-hosted package.