{{- $heading := "See also" }} {{- $related := site.RegularPages.Related . | first 5 }} {{- if eq .Type "functions" }} {{- $heading = "Related functions" }} {{- $opts := dict "document" . "indices" (slice "relatedFunctions") }} {{- $related = site.RegularPages.Related $opts | first 7 }} {{- end }} {{- with $related }}