Embed an Instagram post in your content using the instagram shortcode.
To override Hugo’s embedded instagram
shortcode, copy the
source code to a file with the same name in the layouts/shortcodes
directory.
Example
To display an Instagram post with this URL:
https://www.instagram.com/p/CxOWiQNP2MO/
Include this in your Markdown:
{{< instagram CxOWiQNP2MO >}}
Huge renders this to:
Privacy
Adjust the relevant privacy settings in your site configuration.
privacy:
instagram:
disable: false
simple: false
[privacy]
[privacy.instagram]
disable = false
simple = false
{
"privacy": {
"instagram": {
"disable": false,
"simple": false
}
}
}
- disable
- (
bool
) Whether to disable the shortcode. Default isfalse
. - simple
- (
bool
) Whether to enable simple mode for image card generation. Iftrue
, Hugo creates a static card without JavaScript. This mode only supports image cards, and the image is fetched directly from Instagram’s servers. Default isfalse
.
Last updated:
February 17, 2025
:
all: Change shortcode usage and design to prevent invalid HTML (0fca8ef25)
Improve this page