Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.
You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page
Hugo provides a nice feature that extends Markdown: shortcodes.
Shortcodes are a special tags that you can use when writing your content that are interpreted by Hugo before the Markdown parser. You can think of them as “template macros”.
There are two kinds of shortcodes:
Tag style (surrounds your content)
{{% ExampleShortcode %}} My custom content goes here {{% /ExampleShortcode %}}
Placeholder style (self-closing, adds some content)
{{% ExampleShortcode %}}
You can choose to delimit your shortcodes with either {{% %}}
or {{< >}}
.
If you use the {{% %}}
notation, the content you include between the opening and the closing tag will be processed using Markdown. Otherwise, it will be treated as raw HTML.
Some shortcodes also accept parameters. Use them like this:
{{% ExampleShortcode param1="value1" params2="value2" %}}
Some default shortcodes are provided by Hugo (read shortcodes documentation) and some have been custom-made for this theme.
Here are the most useful shortcodes, both native and custom: