Community-maintained shortcodes for Nikola are listed in this file. To add your own, put it in a repository or a Gist, add a link and description for your shortcode to this file and send a pull request. Please use the existing entries as a guideline for formatting your new entry. The Extending Nikola manual describes how to implement shortcodes.
To use a template-based shortcode: save it to the shortcodes/
directory
of your Nikola site and follow the usage instructions given by shortcode's
author.
Author: Roberto Alsina (ralsina) Gist: https://gist.github.com/ralsina/e02a7bd0e27255dfac522ca16de78fb3
Create a carousel containing the images from a gallery. Meant to be used in bootstrap4-based themes.
Author: Christopher Arndt (SpotlightKid)
Download: audio.tmpl
A Jinja2 template-based shortcode for Nikola to embed a HTML5 audio player and download links.
{{% audio src=http://example.com/my-track.mp3 %}}
Or:
{{% audio src=http://example.com/my-track.mp3 formats=mp3,ogg %}}
Sorry, your browser does not seem to support the HTML 5 audio element.
{{% /audio %}}
The shortcode supports a few other parameters:
{{% audio src=my-track.mp3 download="Datei herunterladen:" nocontrols=1 loop=1 autoplay=1 %}}
And:
{{% audio src=http://example.com/my-track.mp3 nodownload=1 %}}
Boolean parameters must have a value to take effect, but it doesn't matter what the value is.
Author: Anke K (encarsia)
Gist:
- Jinja2 template: mastodon.tmpl
- Mako template: mastodon.tmpl
Template-based shortcode to embed Mastodon posts.
{{% mastodon status=https://instance.domain/@user/tootnr %}}
Optional parameters:
width
(default: 600)height
(default: 333)
Example:
{{% mastodon status=https://instance.domain/@user/tootnr % width=300 height=600}} will show a 300x600 frame instead of the default 600x300