Cheatsheet

List of tricks

By Support | 16 May, 2019

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"  >}}

(without the forward slash at the beginning)

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}

TOC

Table of contents will NOT work in 2019-05 with the MMark format.

i.e. if you have a markdown table on the page (and you need MMark for that), then it is a nogo.

Code and syntax highlighting

https://gohugo.io/content-management/syntax-highlighting/

MMark

Various formating options:

  • table caption
  • formating tables

Syntax: https://mmark.nl/post/syntax/

Blackfriday

https://gohugo.io/content-management/formats/