<p><a href="https://github.com/simple-icons/simple-icons">Simple Icons</a> is a free and open source icon set for popular brands including social media sites such as Twitter, YouTube, Twitch, GitHub, and so on.
This is a perfect component for getting social media icons.</p>
</div>
<div class="paragraph">
<p>Usually to make use of this icon set in Hugo, you would have to download each icon you need.
Luckily, there’s an easier way to make use of the set with <a href="https://gohugo.io/hugo-modules/">Hugo modules</a>.
In the future, Hugo will have an easier way to <a href="https://discourse.gohugo.io/t/esbuild-looks-like-we-can-finally-get-solid-hugo-modules-support/28757">integrate</a> <a href="https://gohugo.io/commands/hugo_mod_npm/#readout">with JavaScript modules</a>.
<p>To get started, simply initialize your Hugo site as a Hugo module with <code>hugo mod init $HUGO_MOD_NAME</code> where <code>$HUGO_MOD_NAME</code> is simply the name of the Hugo module which could be anything.
For example, if you host your Hugo site on GitHub pages, you might want to name your module like <code>github.com/$USER/$HUGO_SITE_REPO</code>.</p>
</div>
<div class="paragraph">
<p>Then, add the Simple Icons repo as a dependency module in your site configuration.
The following configuration gets the icon set and the metadata and places them at <code>assets/icons</code> and <code>data/simple-icons.json</code> respectively.</p>
<p>And the SVG source will be applied inline to the resulting page.
This opens up a lot of uses with the icon set.</p>
</div>
<div class="paragraph">
<p>Let’s reimplement the <a href="../configurable-list-of-contacts.html">configurable list of contacts</a> with added feature of adding an icon from the set with each key serves as the icon to be displayed.</p>
<a href="#_footnoteref_1">1</a>. Or integrating with NPM which <a href="https://gohugo.io/news/0.75.0-relnotes/">Hugo</a> certain has more support in the upcoming version.
<title type="text">Configurable list of contacts</title>
<link rel="alternate" href="https://foo-dogsquared.github.io/hugo-theme-contentful/recipes/configurable-list-of-contacts/" hreflang="en" title="Configurable list of contacts"/>
<p>I want my Keybase profile to appear first than anything else for whatever reason so the <code>weight</code> key is set to -1.</p>
</div>
<div class="paragraph">
<p>With this data, we can then create a template out of it.
I’ve put the following template in a partial named <code>contacts</code> (i.e., <code>layouts/partials/contacts</code>).</p>