{{ if gt (len (where .Site.RegularPages "Section" "==" "posts")) 0 }}
{{ end }}
{{ if .Site.Taxonomies.tags }}
{{ $tags := slice }}
{{ $first := slice }}
{{ $rest := slice }}
{{ range .Site.Taxonomies.tags }}
{{ $tags = $tags | append (dict "title" .Page.Title "link" .Page.RelPermalink) }}
{{ end }}
{{ $sum := len $tags }}
{{ $maxTags := .Site.Params.maxTags }}
{{ if $maxTags }}
{{ $first = first $maxTags $tags }}
{{ $rest = last (sub $sum $maxTags) $tags }}
{{ end }}
{{ end }}