{{ if and (.Site.Params.enableRelatedArticles | default false) .Params.tags }} {{ $postsList := where ( where ( where site.RegularPages "Params.tags" "!=" nil ) "Params.tags" "intersect" .Params.tags ) "Permalink" "ne" .Permalink }} {{ if $postsList }} {{ if site.Params.randomRelated | default false }} {{ $postsList = shuffle $postsList }} {{ end }}
{{ end }} {{ end }}