Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mermaid diagram rendering broken #138

Closed
2 tasks done
jemgunay opened this issue Nov 27, 2023 · 5 comments
Closed
2 tasks done

Mermaid diagram rendering broken #138

jemgunay opened this issue Nov 27, 2023 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jemgunay
Copy link

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for support

Describe the bug

I attempted to embed Mermaid diagrams in a markdown page, but the built site fails to render them correctly. They seem to successfully render locally when running via hugo server, but not when built via hugo. I also see Javascript errors related to Mermaid in the browser console.

This issue appears to exist on the published lotusdocs documentation also: https://lotusdocs.dev/docs/features/mermaid/

Expected behavior

The built site to correctly render Mermaid diagrams defined in markdown.

Screenshots

Example of failed rendering & console error on lotus docs page:
Screenshot 2023-11-27 at 15 07 24

Location of console error:
Screenshot 2023-11-27 at 15 09 21

Environment

- OS: MacOS M2 & Android mobile
- Browser: Chrome & Firefox on desktop, Chrome on mobile
- Browser Version: Chrome Version 119.0.6045.159 (Official Build) (arm64)
@jemgunay jemgunay changed the title Mermaid diagrams broken Mermaid diagram rendering broken Nov 27, 2023
@colinwilson colinwilson added the bug Something isn't working label Nov 27, 2023
@colinwilson colinwilson self-assigned this Nov 27, 2023
@colinwilson colinwilson added this to the v0.2.0 milestone Nov 27, 2023
@colinwilson
Copy link
Owner

Thanks for catching this @jemgunay 👍. Will issue a fix very soon.

@rusinikita
Copy link

A bit of context. Locally it runs good.

Page with no render

Local render. Setup
Screenshot 2023-11-29 at 17 51 18

@colinwilson
Copy link
Owner

Thanks. 👍

I think the issue is with the minifcation of the mermaid JavaScript.

@colinwilson
Copy link
Owner

Fixed by #141

@jemgunay
Copy link
Author

jemgunay commented Dec 5, 2023

@colinwilson Rebuilt with the latest release commit and works as expected. Swift fix much appreciated 🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants