badboy / mdbook-mermaid

A preprocessor for mdbook to add mermaid support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Making use of CDN

steinemann opened this issue · comments

commented

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

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