mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-02 02:49:32 -05:00
17 lines
475 B
HTML
17 lines
475 B
HTML
{{- $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 }}
|
|
<h2>{{ $heading }}</h2>
|
|
<ul>
|
|
{{- range . }}
|
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
|
{{- end }}
|
|
</ul>
|
|
{{- end }}
|