Hugo Shortcodes

img/posts/img-2.jpg

Hugo is using markdown for content format, but there are times when Markdown falls short. Often we are forced to use the raw HTML, to overcome these limitations Hugo created shortcodes.

What is a shortcode?

A shortcode is a simple snippet inside the content file that Hugo will render using a predifened template. You can find the below readily availablw shortcodes in this theme:

Figure

This adds an image with caption.

With caption.

With caption.

Details

This simply adds the html5 detail attribute, supported on all modern browsers. Use it like this:

This is the details title (click to expand) This is the content (hidden until clicked).

Split

This adds a two column side-by-side environment (will turn into 1 col for narrow devices):

This is column 1.
This is column 2.


Written By

Bino Kochumol Varghese

She was born to be free, let her run wild in her own way and you will never lose her.