-
-
Notifications
You must be signed in to change notification settings - Fork 399
Description
Feature Description
Previously I was using the https://github.com/adityatelange/hugo-PaperMod theme.
Over there you could use:
---
title: test_post
cover:
image: "og-image.png"
# [...]
relative: true # To use relative path for cover image, used in hugo Page-bundles
---
to add an Open Graph image to a post.
I found this feature to be very helpful, because the relative part allowed me to put all ALL files for a blog post in one folder:
Problem/Solution
Problem:
Hextra does not allow relative paths for Open Graph images. You have to place them in e.g.: /static/images/og-image.png and call them with
---
title: test_post
params:
images:
- "/images/og-image.png"
---
Solution:
Add the same feature as in PaperMod: https://github.com/adityatelange/hugo-PaperMod/wiki/Features#post-cover-image
(I think) here is their implementation: https://github.com/adityatelange/hugo-PaperMod/blob/1cf53273c3ba58f0593ecb7c2befe11274f51a4e/layouts/partials/templates/opengraph.html#L38
Alternatives Considered
Additional Context