I feel like I have almost the same question as How to set open graph image for a specific page?, but I don’t see the proper answer there.
I’ve just created a new blog-like website with Hugo and used Tailwind theme. The theme has layouts/partials/head.html
which contains bunch of code, including {{ template "_internal/opengraph.html" . }}
. I don’t have my own templates, heads, partials or what’s not, I would like to use theme as much as possible.
And I want to do two things:
- First, modify
og:title
that it always matches HTML tagtitle
(now it only has post title while I’d like to havePost Title | Blog title
(what’s already today in HTML tagtitle
) - Second, improve
og:image
that it takes post’simage
automatically. Today it uses some page images which doesn’t seem to work for me.
What I do not want is to copy the full source code of neither theme’s layouts/partials/head.html
nor _internal/opengraph.html
. Is there a way to do it?
Alternatively, at least, is there a way to “override” _internal/opengraph.html
alone (I’ll still need to copy-paste the full code and modify two lines I need, right?)?