Twitter cards

This will add Twitter cards for your webpages. (Be sure to copy the head partial first in your own layout folder.)

Thankfully, Hugo already has an internal template for Twitter cards. Simply add {{- template "_internal/twitter_cards.html" . -}} somewhere in your own copy. (For reference, here’s the source code for the internal template.)

You could also roll your own Twitter cards but I recommend to modify the internal template instead fitting your specific needs. (Copy the internal template from the given link, create it as a partial in layouts/partials/twitter_cards.html, modify it, and insert the template with {{- partial "twitter_cards.html" -}}.)