update related post setting, ref #165

This commit is contained in:
Somrat
2025-01-13 09:31:36 +06:00
parent 2c17174c8c
commit defe83d7c4
4 changed files with 30 additions and 31 deletions

View File

@@ -76,7 +76,7 @@
</div>
<!-- Related posts -->
{{ $related := (where site.RegularPages "Section" "in" site.Params.mainSections) | intersect (where site.RegularPages ".Title" "!=" .Title) | union (site.RegularPages.Related . ) }}
{{ $related := .Site.RegularPages.Related . | first 10 }}
{{ $related = $related | shuffle | first 3 }}
{{ with $related }}
<div class="section pb-0">

View File

@@ -30,7 +30,7 @@
</li>
</ul>
{{ end }}
<p class="mb-6">{{ .Summary }}</p>
<p class="mb-6">{{ .Summary | plainify }}</p>
<a class="btn btn-outline-primary btn-sm" href="{{ .RelPermalink }}">
{{ T "read_more" }}
</a>