Unclear Ionicons prefixes and limited font awesome icons in R Markdown

Hello, I would like help figuring out the correct prefix for using ionicons in R markdown.

Using the logo-name as supplied on ionicon's website does not render the appropriate icon.

For example, the twitter icon will show up in rmd only when ion-social-twitter is used (this is the only ionicon example given in the R Markdown book), but the name of the icon on iconicon's website is logo-twitter. It's not clear how one would know to use social as part of the prefix.

As another example, it's not clear how to figure out how to use the icon for "school". It will not render, after trying the following:

  • ion-icon-school
  • ion-school

Lastly, I'm also running into issues with rendering some of the (free) font awesome icons (e.g. fa-carrot , fa-pizza ). Is there only a subset of font awesome icons that work with R markdown?

There is a related open issue here:

The problem basically comes down to the fact that Font Awesome (and presumably ionicons, from what you've described) have changed their naming conventions, but which convention you use depends on what version of FA or ionicons you're using.

So, for FontAwesome, you can see the css that's imported for R Markdown here:


(Or as webfonts here: https://github.com/rstudio/rmarkdown/tree/f111cf9601393317bac9cbc0e6dc81336c4fe002/inst/rmd/h/fontawesome/webfonts )

Ionicons looks like it's at v 2.0

There is an icons package that's dedicated to icon rendering, but IIRC (or, last time I ran into this), these weren't necessarily all updated either:

1 Like

Thanks! That solves the mystery for me.

So for ionicons v2, there are less icons available, and the naming conventions are indeed different. Here are they are: https://ionicons.com/v2/cheatsheet.html

And for font awesome, it seems like the icons I was searching for were added after the 5.1.0 version that R markdown uses(e.g. carrot is v5.6):

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.