hugo-coder icon indicating copy to clipboard operation
hugo-coder copied to clipboard

Mermaid support

Open jneo8 opened this issue 3 years ago • 1 comments

Is there any plan/way to support mermaid in this theme?

jneo8 avatar Aug 21 '21 17:08 jneo8

Not, but it is a good addition for this theme.

luizdepra avatar Sep 23 '21 13:09 luizdepra

Closing because #595 was merged.

luizdepra avatar Aug 12 '22 14:08 luizdepra

How, exactly, does one use the mermaid feature? I do not see that shortcode importing the mermaid.js script anywhere.

abhemanyus avatar Aug 15 '22 17:08 abhemanyus

Something broken when we made a recent refactor. I'm going to take a look.

luizdepra avatar Aug 16 '22 12:08 luizdepra

It is working now. See here. Sadly, It is not possible to change themes yet. I need to make a little refactor to make it happen.

luizdepra avatar Aug 16 '22 13:08 luizdepra

Is it possible to make mermaid generate the .svg, and then embed that into the webpage? Even the minified javascript is over 1MB in size, and makes it impossible to have a javascript-free site. Edit: Similar to this https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator

abhemanyus avatar Aug 16 '22 14:08 abhemanyus

Yes, you could add the generated images as static files. But, you'll need to create a Makefile or something like that to generate the images before running Hugo.

luizdepra avatar Aug 16 '22 17:08 luizdepra

Yes, you could add the generated images as static files. But, you'll need to create a Makefile or something like that to generate the images before running Hugo.

Nice, gonna look into that. Thanks!

abhemanyus avatar Aug 16 '22 17:08 abhemanyus