Skip to content

Need help for hide cover image from single.html #1286

Answered by khoile2002
khoile2002 asked this question in Help
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@markdumay
Comment options

Answer selected by markdumay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants