aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/layouts/partials/related.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/layouts/partials/related.html')
-rw-r--r--docs/layouts/partials/related.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/layouts/partials/related.html b/docs/layouts/partials/related.html
new file mode 100644
index 000000000..05a2e9160
--- /dev/null
+++ b/docs/layouts/partials/related.html
@@ -0,0 +1,17 @@
+{{- $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 }}