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.
privacy:
x: null
[privacy]
{
"privacy": {
"x": null
}
}
- disable
- (
bool) Whether to disable the shortcode. Default isfalse. - enableDNT
- (
bool) Whether to prevent X from using post and embedded page data for personalized suggestions and ads. Default isfalse. - simple
- (
bool) Whether to enable simple mode. Iftrue, Hugo builds a static version of the of the post without JavaScript. 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:
x: null
[services]
{
"services": {
"x": null
}
}