Grav Markdown Font Awesome Plugin
The Font Awesome plugin for Grav allows you to use Font Awesome icons inline with markdown by wrapping the icon name in colons (Github/Slack "emoji style"):
The plugin works by looking for colon-wrapped icon names starting with the
:fa- prefix and converting them to
This plugin doesn't contain the actual Font Awesome fonts, so make sure you are using a plugin or theme (such as Learn2 or Antimatter) that include the Font Awesome assets.
Also, Markdown Extra must be disabled.
Download zip version of this repository, unzip to
/your/site/grav/user/plugins and rename directory to
The markdown-fontawesome.yaml file contains only one configuration which turns the plugin on/off.
Grab a cup of :fa-coffee: and write some :fa-code:
Will produce the following HTML:
Grab a cup of <i class="fa fa-coffee"></i> and write some <i class="fa fa-code"></i>
- Does not work with Markdown Extra enabled (conflicts with definition lists which start with a colon)
- Icon names are not validated, so html tags are created even for non-existent icons like `:fa-not-a-real-icon:``
- Additional fa classes such as
fa-2xnot yet supported.
If you prefer shortcode syntax
[fa=cog /], consider using the Grav Shortcode Plugin which also supports Font Awesome.
MIT license. See LICENSE