added option to shuffle related articles at build

This commit is contained in:
Gabriele Musco 2021-04-15 10:14:05 +02:00
parent e7257ec518
commit 9f75eb3378
No known key found for this signature in database
GPG key ID: 8539FD3454380B83
2 changed files with 4 additions and 0 deletions

View file

@ -6,6 +6,9 @@
) "Params.tags" "intersect" .Params.tags
) "Permalink" "ne" .Permalink
}}
{{ if site.Params.randomRelated | default false }}
{{ $postsList = shuffle $postsList }}
{{ end }}
<div class="relatedArticlesContainer">
<hr />
<h2>More posts like this</h2>