Icon
<time datetime="2023-06-21 00:00:00 +0000 UTC">June 21 2023</time><span class="px-2 text-primary-500">·</span><time datetime="2024-02-20 16:00:25 -0600 CST">Updated: February 20 2024</time><span class="px-2 text-primary-500">·</span><span>118 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">1 min</span>
Blowfish
Shortcodes
Icon
blowfish shortcodes - This article is part of a series.
🐡 Shortcodes
icon
outputs a scaled SVG icon
icon
takes the icon name as its only parameter. The icon is scaled to match the current text size.
Example:
{{< icon "github" >}}
Output:
Icons are populated using Hugo pipelines which makes them very flexible. Blowfish includes a number of built-in icons for social, links and other purposes.
Check the icon samples page for a full list of supported icons.
Custom icons can be added by providing your own svg icon assets in the assets/icons/
directory of your project.
The icon can then be referenced in the shortcode by using the SVG filename without the .svg
extension.
Icons can also be used in partials by calling the icon partial.