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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add font-awesome css to docsify index.html #3271

Merged
merged 3 commits into from Aug 4, 2022

Conversation

heyfirst
Copy link
Contributor

@heyfirst heyfirst commented Jul 31, 2022

馃搼 Summary

Because docsify index.html does not have font-awesome CSS file setup yet. Thus, Docsify can not render the font-awesome icon in any example pages.

This PR is adding font-awesome.min.css in version 5.9.0 and also adding statement to the document that Mermaid now only support font-awesome version 4 and 5 only. The reason explained on 馃搹 Design Decisions

Resolves #3190

馃搹 Design Decisions

This PR is adding font-awesome.min.css in version 5.9.0 (Latest Version: 6.1.2) because Mermaid's font-awesome seems supported only old syntax.

For example,

  • (Twitter icon) in version 6 is using fa-brands prefix instead of fab, such as <i class="fa-brands fa-twitter"></i>
  • (Car icon) in version is also using fa-solid as well, such as <i class="fa-solid fa-car"></i>

We should update the font-awesome extractor to support the version 6 as well.

But it should not included in this PR as it out of scope of the issue. We need to update regex to extract the right fa class and write a unit test to make sure every versions (v4, v5, and v6) are working properly.

馃搵 Tasks

Make sure you

  • 馃摉 have read the contribution guidelines
  • 馃捇 have added unit/e2e tests (if appropriate)
  • 馃敄 targeted develop branch

馃毃 The unit test fail because of latest commit on develop branch. 8681e78

@knsv
Copy link
Collaborator

knsv commented Aug 4, 2022

Thanks, long overdue!

@knsv knsv merged commit 6f7670e into mermaid-js:develop Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fontawesome example is broken in docs
2 participants