<p>
    <small>
      {{ if isset .Params "categories" }}
      {{ $len := (sub (len .Params.categories) 1)}}
      {{ range $key, $name := .Params.categories }}
        {{ $pagepath := $name | urlize | lower | printf "%s%s" "/categories/"}}
        {{ $p := $.Site.GetPage $pagepath}}
        <a href="{{ $p.RelPermalink }}">{{ $p.Title }}</a> |
      {{ end }}
    {{ end }}

    {{ if isset .Params "tags" }}
      {{ $len := (sub (len .Params.tags) 1)}}
      {{ range $key, $name := .Params.tags }}
        {{ $pagepath := $name | urlize | lower | printf "%s%s" "/tags/"}}
        {{ $p := $.Site.GetPage $pagepath}}
        <a href="{{ $p.RelPermalink }}">{{ $p.Title }}</a>
        {{ if ne $key $len }} | {{ else }}{{ end }}
    {{ end }}
    {{ end }}
    </small>
</p>