Shortcodes

Shortcodes are a way to add custom functionality to your contents/posts. They are used to add custom functionality to your posts. If you need to add a custom shortcode, you can contact us for a custom service.

Highlight Shortcode

{{< highlight html >}}
<section class="section">
  <div class="container">
    <h1>Hello World!</h1>
  </div>
</section>
{{< /highlight >}}

This shortcode allows you to highlight text. Highlight takes exactly one required language parameter. See the Highlighting documentation for a list of supported languages.

Gist Shortcode

{{< gist johndoe 12345 >}}

You can embed a Github gist in your content. It takes two parameters, First the username and then the gistid. The following example will embed a gist from the user johndoe with the id 12345.

Youtube Shortcode

{{< youtube w7Ft2ymGmfc >}}

The youtube shortcode embeds a responsive video player for YouTube videos. This shortcode takes a single parameter, the video ID.

Vimeo Shortcode

{{< vimeo 146022717 >}}

The Vimeo shortcode embeds a responsive video player for vimeo videos. This shortcode takes a single parameter, the video ID.

Instagram Shortcode

{{< instagram BQD9zQQFQZ >}}

If you want to display your Instagram photos, you can use the Instagram shortcode. You only need the photo’s ID. You can find the ID in the URL of the photo. For example, the URL of the photo is https://www.instagram.com/p/BQD9zQQFQZ/ and the ID is BQD9zQQFQZ.

Twitter Shortcode

{{< tweet 877500564405444608 >}}

This shortcode allows you to embed a Twitter feed. You can use it to display a feed of a specific user’s tweets. This shortcode takes one parameter. The parameter is the id of the feed you want to display.

Improve this page on Github  — Last updated:  Mon, Sep 13, 2021