mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
Add Related Content to sidebar
This commit is contained in:
parent
54b6dca78a
commit
ebb7dc3b45
@ -1,6 +1,23 @@
|
|||||||
{{- if .Params.toc -}}
|
{{- if .Params.toc -}}
|
||||||
<div class="bg-light-gray mb-4 pa3 nested-list-reset nested-copy-line-height nested-links">
|
<div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
|
||||||
<p class="list b mb3">What's in this {{ humanize .Type }}</p>
|
<p class="f5 b mb3">What's in this {{ humanize .Type }}</p>
|
||||||
{{ .TableOfContents }}
|
{{ .TableOfContents }}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ $related := .Site.RegularPages.Related . | first 15 }}
|
||||||
|
|
||||||
|
{{ with $related }}
|
||||||
|
<div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
|
||||||
|
<p class="f5 b mb3">Related</p>
|
||||||
|
<ul class="pa0 list">
|
||||||
|
{{ range . }}
|
||||||
|
<li class="mb2">
|
||||||
|
<a href="{{ .RelPermalink }}">
|
||||||
|
{{- .Title -}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user