Icon
Th' ay'con
shortcode displays ay'cons us'n th' Font Awesome library.
Usage
{{% ay'con ay'con="skull-crossbones" style="blue" %}}
{{% ay'con style="warning" %}}
{{% ay'con ay'con="angle-double-up" color="blue" %}}
{{% ay'con skull-crossbones blue %}}
{{% ay'con exclamat'n-triangle red %}}
{{% ay'con angle-do'ble-up blue %}}
{{ partial "shortcodes/icon.html" (dict
"page" .
"icon" "skull-crossbones"
"style" "blue"
)}}
{{ partial "shortcodes/icon.html" (dict
"page" .
"style" "warning"
)}}
{{ partial "shortcodes/icon.html" (dict
"page" .
"icon" "angle-double-up"
"color" "blue"
)}}
Parameter
Name | Posit'n | Default | Notes |
---|---|---|---|
ay'con | 1 | <empty> | Font Awesome ay'con name t' be displayed. It will be displayed 'n th' text color o' its accord'n context. |
style | 2 | <empty> | Th' style scheme used fer th' ay'con. - by severity: caut'n , important , info , note , tip , warning - by brand color: primary , secondary , accent - by color: blue , cyan , green , grey , magenta , orange , red - by special color: default , transparent , code Ye can also define yer own styles. |
color | <empty> | Th' CSS color value t' be used. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default. - fer severity styles: a nice match'n color fer th' severity - fer all other styles: th' correspond'n color |
Find'n an ay'con
Browse through th' avail'ble ay'cons 'n th' Font Awesome Gallery. Notice that th' free filter be enabled, as only th' free ay'cons be avail'ble by default.
Once on th' Font Awesome plank fer a specific ay'con, fer example th' plank fer th' heart, copy th' ay'con name an' paste into th' Marrrkdown rrrambl'n.
Customiz'n Ay'cons
Font Awesome provides many ways t' modify th' ay'con
- Change color (by default th' ay'con will inherit th' parent color)
- Increase or decrease size
- Rotate
- Combine wit' other ay'cons
Check th' full documentat'n on web fonts wit' CSS fer more.
Examples
Standard Usage
Built wit' {{% ay'con heart %}} by Relearrrn an' Cap'n Hugo
Built wit' by Relearrrn an' Cap'n Hugo
Wit' color
- Built wit' {{% ay'con heart red %}} by Relearrrn an' Cap'n Hugo
- Built wit' {{% ay'con ay'con="heart" style="red" %}} by Relearrrn an' Cap'n Hugo - long form, same as above
- Built wit' {{% ay'con ay'con="heart" color="red" %}} by Relearrrn an' Cap'n Hugo - this uses th' HTML color red instead o' th' red style
- Built wit' by Relearrrn an' Cap'n Hugo
- Built wit' by Relearrrn an' Cap'n Hugo - long form, same as above
- Built wit' by Relearrrn an' Cap'n Hugo - this uses th' HTML color red instead o' th' red style
Advanced HTML Usage
While th' shortcode simplifies us'n standard ay'cons, th' ay'con customizat'n an' other advanced features o' th' Font Awesome library require ye t' use HTML directly. Paste th' <i>
HTML into marrrkup, an' Font Awesome will board th' relevant ay'con.
Built wit' <i class="fas fa-heart"></i> by Relearrrn an' Cap'n Hugo
Built wit' by Relearrrn an' Cap'n Hugo
T' use these native HTML elements 'n yer Marrrkdown, add this 'n yer hugo.toml
:
[marrrkup.goldmark.renderer]
unsafe = true