Color theme Dark mode Font size Content width

Mastodon Embed Shortcode for hugo

Published on 09/12/2018

You may know that I made some shortcodes for Hugo, the static site generator I am using to create this website. So far I made a shortcode for and which allow to embed CodePen and “Can I Use” embeds easily with Hugos build-in Shortcode system.

Today I made another one which allows embeds from Mastodon, the decentralized Twitter-like social network. An example embed is shown below.

The Source Code can be found on


The shortcode is fairly simple and requires only one attribute: The link to a single toot, e.g.

{{< mastodon status="" >}}

Additional parameters:

# All parameters
{{< mastodon status="" width="1000" height="500" >}}

Below is a short description for each parameter

Parameter Value
status The link to the status
width The width of the iframe
height The height of the iframe




Like this?

If this content has helped you or your company, consider making a donation to a good cause.

For example, consider donating to the following causes:

A Selfie of me

Kevin Gimbel

is a DevOps Engineer and avid (Video) Gamer. He’s also interested in Sci-Fi, Cyberpunk, and dystopian books.

Wearing a mask is a good idea!

You can find out more about me if you wish.