Rename related partial to relatedposts.

This commit is contained in:
Fredrik Jonsson 2024-11-25 19:39:08 +01:00
commit 24e8b00ad3
2 changed files with 1 additions and 1 deletions

View file

@ -9,7 +9,7 @@
{{ .Content }}
{{ if $.Param "relatedposts" | default false }}{{ partial "related.html" . }}{{ end -}}
{{ if $.Param "relatedposts" | default false }}{{ partial "relatedposts.html" . }}{{ end -}}
{{ if ne .Lastmod .Date }}{{ partial "dates.html" . }}{{ end -}}
</article>

View file

@ -0,0 +1,11 @@
<aside class="related layout__related">
{{ $related := site.RegularPages.Related . | first 3 -}}
{{ with $related -}}
<h2>{{ i18n "string_see_also" }}</h2>
<ul>
{{ range . -}}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end -}}
</ul>
{{ end -}}
</aside>