{{- if isset .Page.Params "tags" -}}
{{- $tagsLen := len .Params.tags -}}
{{- if gt $tagsLen 0 -}}
<!-- Taglist shamelessly stolen from here: https://github.com/LukeSmithxyz/lugo/blob/master/layouts/partials/taglist.html -->
<div style="clear:both" class=taglist>
  {{- with .Site.Params.relatedtext }}{{ . }}<br>{{ end -}}
  {{- range $k, $v := .Params.tags -}}
  {{- $url := printf "tags/%s" (. | urlize | lower) -}}
  <a id="tag_{{ . | lower }}" href="{{ $url | absURL }}">{{ . | title }}</a>
  {{- if lt $k (sub $tagsLen 1) }} &middot; {{ end -}}
  {{- end -}}
</div>
{{- end -}}
{{- end }}
