Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jimfrenette/hugo-starter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/menu-contextual.html')
-rw-r--r--layouts/partials/menu-contextual.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/layouts/partials/menu-contextual.html b/layouts/partials/menu-contextual.html
new file mode 100644
index 0000000..6f93ab0
--- /dev/null
+++ b/layouts/partials/menu-contextual.html
@@ -0,0 +1,33 @@
+{{/*
+Use Hugo's native Table of contents feature. You must set `toc: true` in your parameters for this to show.
+https://gohugo.io/content-management/toc/
+*/}}
+
+{{- if .Params.toc -}}
+<div>
+ <p>What's in this {{ humanize .Type }}</p>
+ {{ .TableOfContents }}
+</div>
+{{- end -}}
+
+{{/*
+Use Hugo's native related content feature to pull in content that may have similar parameters, like tags. etc.
+https://gohugo.io/content-management/related/
+*/}}
+
+{{ $related := .Site.RegularPages.Related . | first 15 }}
+
+{{ with $related }}
+<div>
+ <p>Related</p>
+ <ul>
+ {{ range . }}
+ <li>
+ <a href="{{ .RelPermalink }}">
+ {{- .Title -}}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+</div>
+{{ end }} \ No newline at end of file