piranha/gostatic

[support] how to get the "image" of the post

Opened this issue · 4 comments

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?

You can check for custom values in header with {{ .Other.Image }} - see description of what you get in Page context here.

Thanks. How can I process it?

(in pseudocode)

if .Other.Image then
  {{ .Other.Image }}

How is that in go?

{{ if .Other.Image }} {{ .Other.Image }} {{ end }} should be good enough...

Thanks a lot,