7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-11-22 22:31:32 +00:00
web-ansol.org/themes/academic/layouts/partials/page_related.html

17 lines
593 B
HTML
Raw Normal View History

2020-06-11 11:46:16 +00:00
{{/* This makes `show_related` optional in `params.toml` and prevents errors if it's removed. */}}
{{ if site.Params.show_related }}
{{ if (index site.Params.show_related .Type) | and (ne .Params.show_related false) | or .Params.show_related }}
{{ $related := site.RegularPages.Related . | first 5 }}
{{ with $related }}
<div class="article-widget content-widget-hr">
<h3>{{ i18n "related" }}</h3>
<ul>
{{ range . }}
2021-10-28 14:52:49 +00:00
<li><a href="{{ .RelPermalink }}">{{ .Date.Format "2006" }}: {{ .Title }}</a></li>
2020-06-11 11:46:16 +00:00
{{ end }}
</ul>
</div>
{{ end }}
{{ end }}
{{ end }}