You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Graham Scragg edited this page Jan 12, 2021
·
1 revision
Shortcodes allow template authors to provide extra functionality for content editors to display custom html/componenets within any description/synopsis fields on their site.
Creation
Any jet templates that sit in the /templates/shortcodes directory of a site template are usable as a shortcode.
Each short code template can reference parameters provided to it as normal template variables. e.g:
templates/shortcodes/code.go
<preclass="{{class}}">{{code}}</pre>
Usage
From within a markdown editor of the admin site an editor can use a shortcode using the following format: {{code class="js" code="alert('Hello World');"}}
Provided Shortcodes
The following shortcodes are provided by kibble.
youtube
Embed a youtube video into a film (or other item) synopsis.
Example: {{youtube id=dQw4w9WgXcQ class="never"}}
Parameter
Required
Description
id
required
Youtube video id, can be found in the url of a youtube page.
class
optional
Name of css class for styling (sizing/positioning) the embedded player.