diff options
| author | eltrac <hi@eltr.ac> | 2026-06-16 15:58:47 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-06-16 15:58:47 +0800 |
| commit | 6e434c3d57ee22470a20232fae8c536b5ab25099 (patch) | |
| tree | 349733ef2ec78e2c86214c6467fd794d9c8273a8 | |
| parent | e926141077add28d590e83b9f861dfed69103d28 (diff) | |
fix(library/page): unwanted empty list when it's the only one book of an author
| -rw-r--r-- | layouts/library/page.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/library/page.html b/layouts/library/page.html index 4cfbc19..ee8d0fc 100644 --- a/layouts/library/page.html +++ b/layouts/library/page.html @@ -39,7 +39,7 @@ {{ with .Params.authors }} {{ $author := index . 0 }} {{ $term := index $.Site.Taxonomies.authors (lower $author) }} - {{ if and $term (gt (len $term.Pages) 0) }} + {{ if and $term (gt (len $term.Pages) 1) }} <h2>我读过的 {{ $author }} 的其它书籍</h2> <div class="grid grid-cols-4 md:grid-cols-6 items-center gap-4 my-4"> {{ range $term.Pages }} |
