Adding image preview to article list using image in page bundle? #315
Unanswered
EdwardDeaver
asked this question in
Q&A
Replies: 1 comment 2 replies
-
This is now available in Congo v2.4.0. Just add an image to the page bundle with "thumb" in the name and it will be included in the article link. The getting started docs have more details on how this new feature works. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to add the ability to have a image preview for my article in the Article-Link.html.
I can't figure out how to add an image that is in a page bundle. Like what is the URL of it?
So if I have a bundle:
-posts
-- MyCoolPost
---- cats.jpg
How do I query that cats photo?
I made a front matter parameter that is a bool for if there is a thumbnail and one for the image path.
{{ if .Params.thumbnail | default false}}
{{$base := .File.Dir}}
{{$foo := .Params.thumbnailLink }}
{{$url := print .Site.Params.baseURL "/" $base $foo}}
{{ end }}
but I can't get that cats photo.
Beta Was this translation helpful? Give feedback.
All reactions