mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
fix(article): related contents is showing hidden post
This commit is contained in:
parent
a3f1d84c51
commit
37a2090739
1 changed files with 2 additions and 4 deletions
|
@ -1,13 +1,11 @@
|
|||
<aside class="related-contents--wrapper">
|
||||
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
||||
{{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }}
|
||||
{{ with $related }}
|
||||
<h2 class="section-title">{{ T "relatedContents" }}</h2>
|
||||
<div class="related-contents">
|
||||
<div class="flex article-list--tile">
|
||||
{{ range . }}
|
||||
{{ if not .Params.hidden }}
|
||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}
|
||||
{{ end }}
|
||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue