Hi,
fist let me say thanks for hugo - it’s a great piece of work! I’ve implemented the {{ template "_internal/opengraph.html" . }}
into my header-partial an added images = ["https://www.nachtexpeditionen.de/img/og_image.jpg"]
to my config.toml to implement a default og:image. Title, description, type and url are rendered properly, but the og:image is missing (https://www.nachtexpeditionen.de/). I’ve already searched for similar topics, but none of them helped me.
Thanks in advice and best regards,
Christoph
I think you have to set images
in the font matter of your content
Thank you for your reply! I thougt it was possible to set a generic og:image in config.toml.
Best regards,
Christoph
Found a good solution for me at:
https://github.com/comfusion/after-dark/blob/master/layouts/partials/meta/ogimage-maybe.html
I’ve added {{ template "_internal/opengraph.html" . }}
and {{ partial "ogimage-maybe.html" . }}
to my header.html and now every page that has no specified og:image falls back to the image from config.toml.
Hope it’s helpful for others - best regards,
Christoph