{{ if .Param "mentionedin" }} {{ if in (.Site.Param "postSections" | default (slice "posts")) .Type }} {{ $mentionedIn := slice }} {{ $current := .RelPermalink }} {{ range .Sites }} {{ $allPages := ( where .RegularPages "Type" "in" (.Param "postSections" | default (slice "posts")) ) }} {{ range $allPages }} {{ if strings.Contains .RawContent $current }} {{ $mentionedIn = $mentionedIn | append . }} {{ end }} {{ end }} {{ end }} {{ with $mentionedIn }}
{{ T "mentionedin" }}
{{ end }} {{ end }} {{ end }}