mirror of
https://gitlab.com/ansol/web-ansol.org.git
synced 2024-12-23 20:35:45 +00:00
17 lines
566 B
HTML
17 lines
566 B
HTML
{{/* 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 . }}
|
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|