diff options
| author | eltrac <hi@eltr.ac> | 2026-05-14 11:42:25 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-05-14 11:42:25 +0800 |
| commit | 7cafed5c40d207ccba358871a2435fd80413c6af (patch) | |
| tree | 425deeccbed62e7fb5faf67f850fc4b3ee90a709 | |
| parent | a27f58150979c34eb79c81c40478010dc9fbe4f5 (diff) | |
fix(library): cannot find related books by English named author
Hugo convers term name to lower cases hence indexing it requires to
convert as well.
| -rw-r--r-- | layouts/library/page.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/library/page.html b/layouts/library/page.html index eb5f152..4cfbc19 100644 --- a/layouts/library/page.html +++ b/layouts/library/page.html @@ -38,8 +38,8 @@ {{ with .Params.authors }} {{ $author := index . 0 }} - {{ $term := index $.Site.Taxonomies.authors $author }} - {{ if and $term (gt (len $term.Pages) 1) }} + {{ $term := index $.Site.Taxonomies.authors (lower $author) }} + {{ if and $term (gt (len $term.Pages) 0) }} <h2>我读过的 {{ $author }} 的其它书籍</h2> <div class="grid grid-cols-4 md:grid-cols-6 items-center gap-4 my-4"> {{ range $term.Pages }} |
