2020-06-03 08:46:59 +02:00
|
|
|
{{ $related := first 3 (where (where .Site.RegularPages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
|
|
|
|
|
|
|
{{ if $related }}
|
2021-03-19 20:58:59 +01:00
|
|
|
<h4 class="page-header" id="related">
|
|
|
|
<a href="#related">
|
|
|
|
<svg class='icon icon-text' width='24' height='24'>
|
|
|
|
<title>Related articles</title>
|
|
|
|
<use xlink:href='#news'></use>
|
|
|
|
</svg>
|
|
|
|
</a>
|
|
|
|
Related Articles
|
2020-06-03 10:21:45 +02:00
|
|
|
</h4>
|
2020-06-03 08:46:59 +02:00
|
|
|
|
|
|
|
{{ range $related }}
|
|
|
|
<article>
|
|
|
|
<h4><a href="{{ .RelPermalink }}">{{ .Title }}</a></h4>
|
2021-06-21 16:13:21 +02:00
|
|
|
<time datetime='{{ .Date.Format "2006-01-02" }}'>
|
|
|
|
<svg class='icon icon-text' width='24' height='24'>
|
|
|
|
<use xlink:href='#cal1'></use>
|
|
|
|
</svg>
|
|
|
|
{{ .Date.Format (.Site.Params.dateFormat | default "02 Jan 2006") }}
|
|
|
|
</time> |
|
|
|
|
{{ if isset .Params "subtitle" }}
|
|
|
|
{{ .Params.subtitle }}
|
|
|
|
{{ else }}
|
|
|
|
{{ .Summary | truncate 50 }}
|
|
|
|
{{ end }}
|
2020-06-03 08:46:59 +02:00
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
{{ end }}
|