Usage
{{< item-socials [from = "instagram-mrmxf github-mrmxf"] [skip = "1"] [count = "3"] >}}A row of social links as Font Awesome 6 brand icons, driven by site.Params.social
Description
Renders a row of social icons. With no parameters it shows every platform that has a handle in site.Params.social, in a fixed order. The from parameter picks specific platforms, and can override a handle inline for a one-off link. Handles are turned into URLs by a built-in pattern per platform; a value that starts with http is used verbatim, which is the escape hatch for anything the patterns get wrong.
Parameters
indicates required parameter
from =
"string"every platform in site.Params.social that has a value
Space-separated platform tokens. A token is a platform name (instagram) or platform-handle (instagram-mrmxf), where the handle overrides site params for that one link. A handle may itself contain hyphens.
skip =
"int"0
Skip this many links from the start of the resolved list.
count =
"int"no cap
Cap the row at this many links. Must be 2 or more: the hw shortcode defaults count to 1 for every tool, so 1 cannot be distinguished from not supplying it and is treated as no cap.
page =
"object"REQUIREDcurrent page
Hugo page context (automatically provided by the hw shortcode)
Examples
Every configured platform
{{<hw t="item-socials">}}Reads site.Params.social and renders each platform that has a handle
Specific platforms, handles from site params
{{<hw t="item-socials" from="instagram linkedin github">}}A token with no handle falls back to site.Params.social
Override a handle inline
{{<hw t="item-socials" from="instagram-mrmxf linkedin-bruce-devlin">}}Everything after the FIRST hyphen is the handle, so bruce-devlin works
A full URL when the pattern is wrong
{{<hw t="item-socials" from="linkedin-https://www.linkedin.com/company/mrmxf">}}LinkedIn company pages do not fit the /in/ pattern, so pass the URL
Skip and cap
{{<hw t="item-socials" skip="1" count="3">}}Drops the first link, then keeps at most three
Additional Information