lxndrblz / anatole

Anatole is a minimalistic two-column theme for Hugo.
https://themes.gohugo.io/themes/anatole/
MIT License
651 stars 363 forks source link

Add Mermaid diagram support #360

Closed jforman closed 2 years ago

jforman commented 2 years ago

Is your feature request related to a problem? Please describe. I love the anatole hugo template, and the ability to have a wide content area. I would like to include Mermaid diagrams (https://mermaid-js.github.io/mermaid/#/) as part of my posts which often contain technical information where a diagram is incredibly helpful to have.

Describe the solution you'd like Ability to enable mermaid support in the config (so that those who dont want to load the JS dont need to), and then include mermaid diagrams in their posts.

Describe alternatives you've considered None

Additional context I've tried a pull request to add the support at https://github.com/lxndrblz/anatole/pull/359, but I'm not sure I'm understanding the templating system quite right, with the hugo documentation (https://gohugo.io/content-management/diagrams/#mermaid-diagrams). The netlify tests so far are failing with my PRs.

Thanks,

jforman commented 2 years ago

I believe I have mermaid support correctly added with my updates to https://github.com/lxndrblz/anatole/pull/359. Thanks!