Need help for hide cover image from single.html #1286
-
Thanks for a wonderful theme. I have an issue that I need help with. I want to hide the cover image from the detail single page ( single.html). Where should I edit with code. Many Thank! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thank you, I have resolved the issue. ( with claude ai ) |
Beta Was this translation helpful? Give feedback.
Thank you, I have resolved the issue. ( with claude ai )
Add a condition at the start of thumbnail.html to skip rendering based on a parameter, e.g., noCover:
{{- $page := .page -}} {{ if not $page.Params.noCover }} {{- $wrapper := printf "img-wrap" -}} ... {{ if $thumbnail -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" $ratio "wrapper" $wrapper "class" $class "title" $page.Params.title "caption" $credits "figclass" $figclass "priority" "high") -}} {{ end -}} {{ end }}
Add noCover: true to the front matter of any page where you don't want the cover image to appear.