Share buttons for blog posts

This might be more involved than what you’re looking for, but here’s how I construct my social share buttons in a Hugo context. The code below is in a partial that I can drop into a single template. The SVG’s can any image you like.

{{ $title := .Title }}
{{ $url := printf "%s" .URL | absLangURL }}
{{ $body := print $title ", by " .Site.Title "\n" .Params.description "\n\n" $url "\n" }}
<div id="sharing">
  <a href="http://www.facebook.com/sharer.php?u={{ $url }}" class="facebook" aria-label="share on Facebook">
    {{ partial "svg/facebook.svg" (dict "size" "32px") }}
  </a>

  <a href="http://twitter.com/share?url={{ $url }}&text={{ $title }}&via={{with .Site.Social.twitter }}{{ . }}{{ end }}" class="twitter" aria-label="share on Twitter">
    {{ partial "svg/twitter.svg" (dict "size" "32px") }}
  </a>

  <a href="mailto:?subject=Check%20out%20{{ $title }}.&body={{ $body }}" class="twitter" aria-label="share on Email">
    {{ partial "svg/email.svg" (dict "size" "32px") }}
  </a>
</div>