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.
hugo.
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
.
The source code for the simple version of the shortcode is available here.
If you enable simple mode you may want to disable the hardcoded inline styles by setting disableInlineCSS
to true
in your site configuration. The default value for this setting is false
.
hugo.
services:
instagram:
accessToken: ""
disableInlineCSS: false
[services]
[services.instagram]
accessToken = ''
disableInlineCSS = false
{
"services": {
"instagram": {
"accessToken": "",
"disableInlineCSS": false
}
}
}