Shortcodes

List of short codes which can be used

By Support | 16 May, 2019

What it is

A shortcode is a magical thing which can be placed in your text and will create special contents for you.

It can create lists, pull in twitter tweets, youTube videos, etc

Shortcode list

Figure

Add an image with title, owner and with link to original picture

TODO: Add proper image to use in doc

{{< figure src="/img/doc/spf13.jpg" title="Steve Francia"  >}}

Attributes

  • width
  • attr (attribution) and attrlink
  • alt - alternative text if image can’t be displayed
  • link - hyperlink to the destination

More info: https://gohugo.io/content-management/shortcodes/

Tables

Tables can be nicely formated using the module

Add to the frontmatter under the edit block

1
2
3
4
# Extra formating
# For tables with "mmark"
# and add above table {.table .pure-table .table-striped .table-responsive}
markup = "mmark"

and above the markdown formated table

1
{.table .pure-table .table-striped .table-responsive}

Notice

Add a notice text within your text.

Example:

Warning

This is a warning text

Use:

{{< notice TYPE >}}
This is my text
{{< /notice >}}

Where TYPE is one of: warning, info, note, tip.