Shortcodes

X

To override Hugo’s embedded x shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory. Example # To display an X post with this URL: https://x.com/SanDiegoZoo/status/1453110110599868418 Include this in your Markdown: {{< x user="SanDiegoZoo" id="1453110110599868418" >}} Rendered: Privacy # Adjust the relevant privacy settings in your site configuration. hugo. yaml   toml   json   privacy: x: null [privacy] { "privacy": { "x": null } } disable (bool) Whether to disable the shortcode. ...

YouTube

To override Hugo’s embedded youtube shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory. Example # To display a YouTube video with this URL: https://www.youtube.com/watch?v=0RKpf3rK57I Include this in your Markdown: {{< youtube 0RKpf3rK57I >}} Hugo renders this to: Parameters # id (string) The video id. Optional if the id is provided as a positional argument as shown in the example above. allowFullScreen (bool) Whether the iframe element can activate full screen mode. ...