summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/shortcodes/bookcard.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/shortcodes/bookcard.html b/layouts/shortcodes/bookcard.html
index fd7f81df..27d96001 100644
--- a/layouts/shortcodes/bookcard.html
+++ b/layouts/shortcodes/bookcard.html
@@ -1,4 +1,5 @@
-{{- $book := .Site.GetPage (printf "library/%s" (.Get 0)) -}}
+{{- $books := where .Site.Pages "Section" "library" -}}
+{{- $book := index (where $books "File.BaseFileName" (.Get 0)) 0 -}}
{{- if $book }}
<div class="markdown-body book-body">