{{ $s := path.Dir (.Permalink | relURL) }} {{ $t := index (split $s "/") 2 }} {{ $o := index (split $s "/") 1 }} {{ if eq $t "post" }}