Hugo ships with several built-in shortcodes for rich content, along with a privacy config and a set of simple shortcodes that enable static and no-JS versions of various social media embeds.
YouTube#
Below is an example using the built-in youtube
shortcode.
Twitter#
This example uses the twitter_simple
shortcode to output a Tweet. It requires two named parameters user
and id
.
“In addition to being more logical, asymmetry has the advantage that its complete appearance is far more optically effective than symmetry.”
— Design Reviewed | Graphic Design History (@DesignReviewed) January 17, 2019
— Jan Tschichold pic.twitter.com/gcv7SrhvJb
Alternatively, the tweet
shortcode can be used to embed a fully marked up Twitter card.
Gist#
The gist
shortcode can be used to embed a GitHub Gist. It requires two unnamed parameters: the username and ID of the Gist.
I hereby claim:
- I am nunocoracao on github.
- I am nunocoracao (https://keybase.io/nunocoracao) on keybase.
- I have a public key ASCgSgKVzt4g5bLjGMEB_nGMpJLNgVRAicVwD0E7aOlY0Qo
To claim this, I am signing this object:
{
"body": {
"key": {
"eldest_kid": "0120a04a0295cede20e5b2e318c101fe718ca492cd81544089c5700f413b68e958d10a",
"host": "keybase.io",
"kid": "0120a04a0295cede20e5b2e318c101fe718ca492cd81544089c5700f413b68e958d10a",
"uid": "c539f9b53feeb1732c065e001ce74019",
"username": "nunocoracao"
},
"merkle_root": {
"ctime": 1649011829,
"hash": "9716cf3c723541d90a26fe625e149d847601441728c21b0d6db1354de5e928198fc5598c3fa6757ca330adba2b960ba8d3a93e74f6d1057d26f8bb359c074536",
"hash_meta": "1ec0d6ae0f3d2466dc49e9a0000020112cb03feac1f4bff6c3313c50ce3fd21c",
"seqno": 22220060
},
"service": {
"entropy": "Tbj0moMSUoCX7X3OXug/cdiD",
"name": "github",
"username": "nunocoracao"
},
"type": "web_service_binding",
"version": 2
},
"client": {
"name": "keybase.io go client",
"version": "5.9.2"
},
"ctime": 1649011878,
"expire_in": 504576000,
"prev": "aa01afe1ed0dc78d27690a47a893dcd004f7bc0d53bfe3fb97e03357012e9ca1",
"seqno": 5,
"tag": "signature"
}
with the key ASCgSgKVzt4g5bLjGMEB_nGMpJLNgVRAicVwD0E7aOlY0Qo, yielding the signature:
hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEgoEoClc7eIOWy4xjBAf5xjKSSzYFUQInFcA9BO2jpWNEKp3BheWxvYWTESpcCBcQgqgGv4e0Nx40naQpHqJPc0AT3vA1Tv+P7l+AzVwEunKHEIOK8Y9BjXfx+7sQimJlgOi3qmuh9ydOOdm5X7OWJ27kAAgHCo3NpZ8RAB+UtUANRvMmfAHD3yO4Sks7/MSB0hbekRbn1Hsay4zYYXUMJulUgZZQM2swm4LXkVcHXG0VT/afuItTzxIQsC6hzaWdfdHlwZSCkaGFzaIKkdHlwZQildmFsdWXEIIcsJ18ixO+/tWoYFPFjc9l5mZ23fPC9FNdvRAFQU60Io3RhZ80CAqd2ZXJzaW9uAQ==
And finally, I am proving ownership of the github account by posting this as a gist.
https://keybase.io/nunocoracao
Consider the keybase command line program.
# look me up
keybase id nunocoracao
Vimeo#
The vimeo_simple
shortcode will embed a Vimeo video.