victoriadrake/hugo-theme-sam

[support] use summary on twitter:card

Beatso opened this issue · 2 comments

how could I modify the theme to use summary instead of summary_large_image for twitter:card meta tag? layout/partials/head.html refers to _internal/twitter_cards.html, but I can't find it. is this not modifiable?

Indirectly, you can alter the internal template's behavior. From the Internal Templates docs:

If images aren’t specified in the page front-matter, then hugo searches for image page resources with feature, cover, or thumbnail in their name. If no image resources with those names are found, the images defined in the site config are used instead. If no images are found at all, then an image-less Twitter summary card is used instead of summary_large_image.

You may also replace the internal Twitter template with your own by changing head.html. I'm certainly open to a PR that would allow for an easier way to choose a card type from the config file!

It looks like this has been idle a while, so I am marking it as stale. Remove the label or comment if this issue should remain open.