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

Add optional mermaid shortcode #551

Merged
merged 4 commits into from
Mar 13, 2022
Merged

Add optional mermaid shortcode #551

merged 4 commits into from
Mar 13, 2022

Conversation

Rihoj
Copy link
Contributor

@Rihoj Rihoj commented Mar 6, 2022

Issue

Fixes #550

Description

Adds support for Mermaid-js

Warning

Styling has not been worked out, and there may be some odd looks. Check the linked issue #550 for an example.

@Rihoj Rihoj changed the title add optional mermaid shotcode add optional mermaid shortcode Mar 6, 2022
@hossainemruz hossainemruz changed the title add optional mermaid shortcode Add optional mermaid shortcode Mar 8, 2022
@hossainemruz
Copy link
Member

@Rihoj Updated the shortcode. Now, it uses page level configuration instead of global mermaid configuration. In order to enable mermaid for a page, you have to set mermaid: true in the page frontmatter. Now, mermaid script will load only in those pages.

Regarding the style issue of Git graph. It seems to be an issue of mermaid-js itself. We have no control of the generated svg. We can use custom theme but it will be lot of hassle. So, I have added an optional background parameter to the shortcode. User can set this to black when there is any readability issue.

Let me know, what you think.

@hossainemruz hossainemruz self-requested a review March 8, 2022 17:20
@kodiakhq kodiakhq bot merged commit c89fe66 into hugo-toha:main Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Mermaid support
2 participants