{{- $data := .Site.Data.links -}}
{{ $scratch := newScratch -}}
{{- range $data -}}
  {{- range .tags -}}
    {{- $scratch.Add "tags" (slice .) -}}
  {{- end -}}
  {{- range .lang -}}
    {{- $scratch.Add "lang" (slice .) -}}
  {{- end -}}
{{- end -}}
<div class="metadata-page">
  <div class="row vertical-align">
    <div class="col-xs-3 col-md-2 text-right">
      <em>Languages:</em>
    </div>
    <div class="col-xs-9 col-md-10">
      <a class="label label-success tag active" tags="all" onclick="selectAllTags()">All</a>
      {{- range sort ($scratch.Get "lang") | uniq }}
        <a class="label label-success tag" tags="{{ . }}" onclick="selectTag('{{ . }}')">{{ . }}</a>
      {{- end -}}
    </div>
  </div>
  <div class="row vertical-align">
    <div class="col-xs-3 col-md-2 text-right">
      <em>Topics:</em>
    </div>
    <div class="col-xs-9 col-md-10">
      <a class="label label-success tag active" tags="all" onclick="selectAllTags()">All</a>
      {{- range sort ($scratch.Get "tags") | uniq }}
        <a class="label label-success tag" tags="{{ . }}" onclick="selectTag('{{ . }}')">{{ . }}</a>
      {{- end -}}
    </div>
  </div>
</div>
