diff options
author | mms <git@sapka.me> | 2024-11-11 21:33:47 +0100 |
---|---|---|
committer | mms <git@sapka.me> | 2024-11-11 21:33:47 +0100 |
commit | 71e48e43cefa0b2830b8f167f5ca5d0a6dad738e (patch) | |
tree | c41fdcfacadf5278576711a5459fbff25cb38f83 /layouts/partials/reviews/related.html | |
parent | 1436e6b4da3586f63220ba340e0e8b838385aaa4 (diff) |
feat: book reviews
Diffstat (limited to 'layouts/partials/reviews/related.html')
-rw-r--r-- | layouts/partials/reviews/related.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/layouts/partials/reviews/related.html b/layouts/partials/reviews/related.html new file mode 100644 index 0000000..6432331 --- /dev/null +++ b/layouts/partials/reviews/related.html @@ -0,0 +1,23 @@ +{{ $page := .}} +{{ $reviews := where .Site.RegularPages "Section" "eq" "reviews" }} +<aside class="related"> + <ul> + {{ range .Page.Params.related }} + {{ $related := slice .}} + <li class="related-item"><b>{{ . }}</b> + <ol class="related-titles"> + {{- range (where $reviews ".Params.related" "intersect" $related) }} + <li> + {{ if (eq . $page) }} + {{ .Params.relatedName}} + {{ else }} + <a href="{{.Permalink}}"> {{ .Params.relatedName }} </a> + {{ end }} + </li> + + {{ end }} + </ul> +</li> +{{ end }} +</ul> +</aside> |