[support] how to get the "image" of the post
Opened this issue · 4 comments
Deleted user commented
Hi,
I would like to put image: yes
in the YAML header of my post, and that gostatic knows that the image associated to the post foo.md
is foo.jpeg
. How can I achieve that?
piranha commented
You can check for custom values in header with {{ .Other.Image }}
- see description of what you get in Page
context here.
Deleted user commented
Thanks. How can I process it?
(in pseudocode)
if .Other.Image then
{{ .Other.Image }}
How is that in go?
piranha commented
{{ if .Other.Image }} {{ .Other.Image }} {{ end }}
should be good enough...
Deleted user commented
Thanks a lot,