Shortcodes - shift72/kibble GitHub Wiki
Shortcodes allow template authors to provide extra functionality for content editors to display custom html/componenets within any description/synopsis fields on their site.
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
<pre class="{{class}}">{{code}}</pre>
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');"}}
The following shortcodes are provided by kibble.
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. |