congo/exampleSite/content/samples/rich-content/index.md

1.4 KiB
Executable File

title date description summary coverAlt coverCaption tags
Rich Content 2019-03-10 A brief description of Hugo Shortcodes This is an _example_ of a **rich** content summary. An example cover image depicting icons of some popular media organisations. This is an example cover image with a caption.
shortcodes
privacy
sample
gist
twitter
youtube
vimeo

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.

{{< youtube ZJthWmvUzzc >}}

Twitter

This example uses the twitter_simple shortcode to output a Tweet. It requires two named parameters user and id.

{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}

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.

{{< gist jpanther a873e1219ffeaa80a926bbe8255f348e >}}

Vimeo

The vimeo_simple shortcode will embed a Vimeo video.

{{< vimeo_simple 48912912 >}}