Shortcode Example

When writing shortcode's documentation, we usually provide examples and their source code so that users can preview the results, read and copy the code, whereas this would require you to repeat a similar code twice. With this shortcode, you can type in the source code once to achieve this.

Donate

Become a backer or sponsor to support our work.

On this page

Sponsors

Syntax

1{{< hugo/shortcode-example >}}
2ESCAPED SOURCE CODE HERE.
3{{< /hugo/shortcode-example >}}

Example

Let’s take param as example.

1{{< hugo/shortcode-example >}}
2Title: {{</* param title */>}}
3{{< /hugo/shortcode-example >}}

Result as follows.

Source
1Title: {{< param title >}}
Result
Title: Shortcode Example