{{ define "main" }}
  <main id="main">
    <h1>{{ .Title }}</h1>
    <ul class="patterns-list">
      {{ $type := .Type }}
      {{ range $key, $value := .Data.Terms.ByCount }}
        {{ $name := .Name }}
        {{ $count := .Count }}
        {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
        <li>
            <a href="{{ .Permalink }}">
              {{ printf "(%d) %s" $count $name }}
            </a>
        </li>
        {{ end }}
      {{ end }}
    </ul>
  </main>
{{ end }}
