Badge

The badge shortcode displays colorful markers in your text with optional icons.

Important Version6.6.6 Captain InfoNew Awesome

Usage

{{% badge %}}Important{{% /badge %}}
{{% badge style="primary" title="Version" %}}6.6.6{{% /badge %}}
{{% badge icon="angle-double-up" style="red" %}}Captain{{% /badge %}}
{{% badge style="info" %}}New{{% /badge %}}
{{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" %}}Awesome{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Important"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "6.6.6"
  "style" "primary"
  "title" "Version"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Captain"
  "icon" "angle-double-up"
  "style" "red"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "New"
  "style" "info"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "color" "fuchsia"
  "content" "Awesome"
  "icon" "fa-fw fab fa-hackerrank"
)}}

Parameters

Name Default Notes
style default The style scheme used for the badge.

- by severity: caution, 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, link, action, inline

You can also define your own styles.
color see notes The CSS color value to be used. If not set, the chosen color depends on the style. Any given value will overwrite the default.

- for severity styles: a nice matching color for the severity
- for all other styles: the corresponding color
title see notes Arbitrary text for the badge title. Depending on the style there may be a default title. Any given value will overwrite the default.

- for severity styles: the matching title for the severity
- for all other styles: <empty>

If you want no title for a severity style, you have to set this parameter to " " (a non empty string filled with spaces)
icon see notes Font Awesome icon name set to the left of the title. Depending on the style there may be a default icon. Any given value will overwrite the default.

- for severity styles: a nice matching icon for the severity
- for all other styles: <empty>

If you want no icon for a severity style, you have to set this parameter to " " (a non empty string filled with spaces)
<content> <empty> Arbitrary text for the badge.

Examples

Style

By Severity

{{% badge style="caution" %}}Magenta{{% /badge %}}
{{% badge style="important" %}}Cyan{{% /badge %}}
{{% badge style="info" %}}Blue{{% /badge %}}
{{% badge style="note" %}}Orange{{% /badge %}}
{{% badge style="tip" %}}Green{{% /badge %}}
{{% badge style="warning" %}}Red{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Magenta"
  "style" "caution"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Cyan"
  "style" "important"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Blue"
  "style" "info"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Orange"
  "style" "note"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Green"
  "style" "tip"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Red"
  "style" "warning"
)}}
CautionMagenta ImportantCyan InfoBlue NoteOrange TipGreen WarningRed

By Brand Colors

{{% badge icon="bullhorn" style="primary" title="Announcement" %}}Mandatory{{% /badge %}}
{{% badge icon="bullhorn" style="secondary" title="Announcement" %}}Optional{{% /badge %}}
{{% badge icon="bullhorn" style="accent" title="Announcement" %}}Special{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Mandatory"
  "icon" "bullhorn"
  "style" "primary"
  "title" "Announcement"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Optional"
  "icon" "bullhorn"
  "style" "secondary"
  "title" "Announcement"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Special"
  "icon" "bullhorn"
  "style" "accent"
  "title" "Announcement"
)}}
AnnouncementMandatory AnnouncementOptional AnnouncementSpecial

By Color

{{% badge icon="palette" style="blue" title="Color" %}}Blue{{% /badge %}}
{{% badge icon="palette" style="cyan" title="Color" %}}Cyan{{% /badge %}}
{{% badge icon="palette" style="green" title="Color" %}}Green{{% /badge %}}
{{% badge icon="palette" style="grey" title="Color" %}}Grey{{% /badge %}}
{{% badge icon="palette" style="magenta" title="Color" %}}Magenta{{% /badge %}}
{{% badge icon="palette" style="orange" title="Color" %}}Orange{{% /badge %}}
{{% badge icon="palette" style="red" title="Color" %}}Red{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Blue"
  "icon" "palette"
  "style" "blue"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Cyan"
  "icon" "palette"
  "style" "cyan"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Green"
  "icon" "palette"
  "style" "green"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Grey"
  "icon" "palette"
  "style" "grey"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Magenta"
  "icon" "palette"
  "style" "magenta"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Orange"
  "icon" "palette"
  "style" "orange"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Red"
  "icon" "palette"
  "style" "red"
  "title" "Color"
)}}
ColorBlue ColorCyan ColorGreen ColorGrey ColorMagenta ColorOrange ColorRed

By Special Color

{{% badge icon="palette" style="default" title="Color" %}}Default{{% /badge %}}
{{% badge icon="palette" style="transparent" title="Color" %}}Transparent{{% /badge %}}
{{% badge icon="palette" style="code" title="Color" %}}Code{{% /badge %}}
{{% badge icon="palette" style="link" title="Color" %}}Link{{% /badge %}}
{{% badge icon="palette" style="action" title="Color" %}}Action{{% /badge %}}
{{% badge icon="palette" style="inline" title="Color" %}}Inline{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Default"
  "icon" "palette"
  "style" "default"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Transparent"
  "icon" "palette"
  "style" "transparent"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Code"
  "icon" "palette"
  "style" "code"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Link"
  "icon" "palette"
  "style" "link"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Action"
  "icon" "palette"
  "style" "action"
  "title" "Color"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Inline"
  "icon" "palette"
  "style" "inline"
  "title" "Color"
)}}
ColorDefault ColorTransparent ColorCode ColorLink ColorAction ColorInline

Variants

Without Icon and Title Text

{{% badge %}}6.6.6{{% /badge %}}
{{% badge icon=" " style="info" title=" " %}}Awesome{{% /badge %}}
{{% badge style="red" %}}Captain{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "6.6.6"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Awesome"
  "icon" " "
  "style" "info"
  "title" " "
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Captain"
  "style" "red"
)}}
6.6.6 Awesome Captain

Without Icon

{{% badge title="Version" %}}6.6.6{{% /badge %}}
{{% badge icon=" " style="info" %}}Awesome{{% /badge %}}
{{% badge style="red" title="Rank" %}}Captain{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "6.6.6"
  "title" "Version"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Awesome"
  "icon" " "
  "style" "info"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Captain"
  "style" "red"
  "title" "Rank"
)}}
Version6.6.6 InfoAwesome RankCaptain

Without Title Text

{{% badge icon="star" %}}6.6.6{{% /badge %}}
{{% badge style="info" title=" " %}}Awesome{{% /badge %}}
{{% badge icon="angle-double-up" style="red" %}}Captain{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "6.6.6"
  "icon" "star"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Awesome"
  "style" "info"
  "title" " "
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Captain"
  "icon" "angle-double-up"
  "style" "red"
)}}
6.6.6 Awesome Captain

All Set

{{% badge icon="star" title="Version" %}}6.6.6{{% /badge %}}
{{% badge style="info" %}}Awesome{{% /badge %}}
{{% badge icon="angle-double-up" style="red" title="Rank" %}}Captain{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "6.6.6"
  "icon" "star"
  "title" "Version"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Awesome"
  "style" "info"
)}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Captain"
  "icon" "angle-double-up"
  "style" "red"
  "title" "Rank"
)}}
Version6.6.6 InfoAwesome RankCaptain

Override for Severity

{{% badge icon="rocket" style="info" title="Feature" %}}Awesome{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Awesome"
  "icon" "rocket"
  "style" "info"
  "title" "Feature"
)}}
FeatureAwesome

Other

With User-Defined Color, Font Awesome Brand Icon and Markdown Title and Content

{{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" title="**Font**" %}}**Awesome**{{% /badge %}}
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "color" "fuchsia"
  "content" "**Awesome**"
  "icon" "fa-fw fab fa-hackerrank"
  "title" "**Font**"
)}}
FontAwesome

With Icon Content

You can combine the badge with the icon shortcode to create even more stunning visuals.

In this case you need to declare {{< badge >}} instead of {{% badge %}}. Note, that in this case it is not possible to put markdown in the content.

{{< badge icon="angle-double-up" style="primary" >}}{{% icon icon="skull-crossbones" /%}}{{< /badge >}}  
{{< badge icon="angle-double-up" style="primary" >}}{{% icon icon="skull-crossbones" /%}} Pirate{{< /badge >}}  
{{< badge style="primary" title="Rank" >}}{{% icon icon="skull-crossbones" /%}}{{< /badge >}}  
{{< badge style="primary" title="Rank" >}}{{% icon icon="skull-crossbones" /%}} Pirate{{< /badge >}}  
{{< badge icon="angle-double-up" style="primary" title="Rank" >}}{{% icon icon="skull-crossbones" /%}}{{< /badge >}}  
{{< badge icon="angle-double-up" style="primary" title="Rank" >}}{{% icon icon="skull-crossbones" /%}} Pirate{{< /badge >}}  
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "icon" "angle-double-up"
  "content" (partial "shortcodes/icon.html" (dict
    "page" .
    "icon" "skull-crossbones"
  ))
  "style" "primary"
)}}  
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "icon" "angle-double-up"
  "content" (partial "shortcodes/icon.html" (dict
    "page" .
    "icon" "skull-crossbones"
  ))
  "style" "primary"
)}}  
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" (partial "shortcodes/icon.html" (dict
    "page" .
    "icon" "skull-crossbones"
  ))
  "style" "primary"
  "title" "Rank"
)}}  
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" (partial "shortcodes/icon.html" (dict
    "page" .
    "icon" "skull-crossbones"
  ))
  "style" "primary"
  "title" "Rank"
)}}  
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "icon" "angle-double-up"
  "content" (partial "shortcodes/icon.html" (dict
    "page" .
    "icon" "skull-crossbones"
  ))
  "style" "primary"
  "title" "Rank"
)}}  
{{ partial "shortcodes/badge.html" (dict
  "page" .
  "icon" "angle-double-up"
  "content" (partial "shortcodes/icon.html" (dict
    "page" .
    "icon" "skull-crossbones"
  ))
  "style" "primary"
  "title" "Rank"
)}}  

Pirate
Rank
Rank Pirate
Rank
Rank Pirate

Inside of Text

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. {{% badge icon="rocket" style="blue" %}}Awesome{{% /badge %}} Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. {{ partial "shortcodes/badge.html" (dict
  "page" .
  "content" "Awesome"
  "icon" "rocket"
  "style" "blue"
)}} Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Awesome Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.