  <section class="sidebar tag-cloud">
 {{/* https://www.sidorenko.io/post/2017/07/nice-tagcloud-with-hugo/ */}}
<h2>Tag Cloud
  <small class="info">
    <a href="{{ "/tags/" | relLangURL }}">See full list</a>
  </small>
</h2>
  {{ if not (eq (len $.Site.Taxonomies.tags) 0) }}
{{ $fontUnit := "rem" }}
{{ $largestFontSize := 2.0 }}
{{ $smallestFontSize := 1.0 }}
{{ $max := len (index $.Site.Taxonomies.tags.ByCount 0).Pages }}
{{ $min := len (index $.Site.Taxonomies.tags.ByCount.Reverse 0).Pages }}
    {{ range $name, $taxonomy := $.Site.Taxonomies.tags }}
        {{ $count := len $taxonomy.Pages }}
        {{ $weight := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }} {{ $currentFontSize := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weight) ) }}
        <a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" style="font-size:{{$currentFontSize}}{{$fontUnit}}">{{ $name }}</a>
    {{ end }}
{{ end }}

  </section>
