{{ $outerRel := .RelPermalink -}} {{ if in $outerRel "posts" -}} {{ partial "anchor-heading.html" (dict "Text" "Posts" "Level" 1 "Anchor" "posts") }} {{ .Content }} {{ else -}} {{ partial "anchor-heading.html" (dict "Text" "Posts" "Level" 2 "Anchor" "posts") }} {{ (.Site.GetPage "posts").Content }} {{- end }}