Skip to main content

Rich Content

<time datetime="2019-03-10 00:00:00 &#43;0000 UTC">March 10 2019</time><span class="px-2 text-primary-500">&middot;</span><time datetime="2023-08-19 21:44:35 -0500 CDT">Updated: August 19 2023</time><span class="px-2 text-primary-500">&middot;</span><span>148 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
Shortcodes Privacy Sample Gist Twitter Youtube Vimeo
Table of Contents

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.

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.

Vimeo #

The vimeo_simple shortcode will embed a Vimeo video.