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

handle new prefix in fontawesome 5 #1967

Merged
merged 1 commit into from
Dec 1, 2020
Merged

handle new prefix in fontawesome 5 #1967

merged 1 commit into from
Dec 1, 2020

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Nov 30, 2020

This will fix #1554

Following fontawesome update to V5 in #1340, there was some missing changes for Rmarkdown website, for which icon can be set in navbar using icon:

With this change, I believe it will not break current behavior as

  • Ionicons can still be used (we have a very old version but it is still working) and class will be ion ion-...
  • Fontawesome icons can be passed as before fa-home. in that case fas prefix will be added - the new default one.
  • Fontawesome icons can also be passed as full name like fab fa-r-project. In that case, the full name will be used as class for the span.

I have chosen to not be specific on the prefix using fa\\w, but we could only check for supported prefix fa(b|s|r|l|d) instead.

This is a quick fix without rethinking the all logic for icons.

I did not find any documentation in the package.

Maybe I should update https://bookdown.org/yihui/rmarkdown/rmarkdown-site.html ?

@cderv cderv requested a review from yihui November 30, 2020 17:55
@apreshill
Copy link
Contributor

This is great! I wonder if this help page could be made to be more helpful? https://rmarkdown.rstudio.com/docs/reference/html-dependencies.html

@cderv
Copy link
Collaborator Author

cderv commented Nov 30, 2020

Oh yeah we could add information on the versions of each dependency, specifically external ones like these icon libs. Thanks for pointing this doc.

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Font Awesome 5 glyphs in navbar
3 participants