Skip to main content
  1. Samples/

Rich Content

·148 words·1 min·
Shortcodes Privacy Sample Gist Twitter Youtube Vimeo
Alan Sun
Author
Alan Sun
举头望明月 明月照沟渠

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 x 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.

Related

Mathematical notation
·150 words·1 min
Sample Katex Maths Shortcodes
Charts
81 words·1 min
Chart Sample Graph Shortcodes
Diagrams and Flowcharts
·250 words·2 mins
Mermaid Sample Diagram Shortcodes
Placeholder Text
··271 words·2 mins
Markdown Text Sample Latin
Emoji 🪂
·97 words·1 min
Emoji Sample
Shortcodes
3435 words·17 mins
Shortcodes Mermaid Icon Lead Docs
Partials
1069 words·6 mins
Partials Analytics Privacy Comments Favicons Icon Docs