The Columns shortcode can be used to organize content side-by-side (horizontally) for better readability.
Usage
{{<columns[size="small|regular|large"]>}} <!-- begin columns block --># Left Content
Dolor sit, sumo unique argument um no ...
<---><!-- magic sparator, between columns --># Mid Content
Dolor sit, sumo unique argument um no ...
<---><!-- magic sparator, between columns --># Right Content
Dolor sit, sumo unique argument um no ...
{{</columns>}}
Attributes
sizeoptionalstring
Preset of different sizes for the first column. Supported values are small|regular|large.
Default:regular
Example
Left
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo.
Mid Content
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re.
Right Content
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo.
Emojify
Emoji can be enabled in a Hugo project in a number of ways.
The emojify function can be called directly in templates or Inline Shortcodes. To enable emoji globally, set enableEmoji to true in your site’s configuration and then you can type emoji shorthand codes directly in content files.
Example
Output
Inline
Shortcode
🙈
:see_no_evil:
{{< emojify ":see_no_evil:" >}}
🙉
:hear_no_evil:
{{< emojify ":hear_no_evil:" >}}
🙊
:speak_no_evil:
{{< emojify ":speak_no_evil:" >}}
The Emoji cheat sheet is a useful reference for emoji shorthand codes.
The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack.
1
2
3
.emoji {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
}
Expand
Expand shortcode can help to decrease clutter on screen by hiding part of text. Expand content by clicking on it.
Usage
{{<expand>}}### Markdown content
Dolor sit, sumo unique ...
{{</expand>}}
It is also possible to use a custom label and symbol.
{{<expand"Custom Label""...">}}### More markdown
Dolor sit, sumo unique ...
{{</expand>}}
Example
Markdown content
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re.
More markdown
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo.
Hint
Hint shortcode can be used as hint/alerts/notification block.
Usage
{{<hinttype=[note|tip|important|caution|warning](icon=gblog_github)(title=GitHub)>}}**Markdown content**\
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture.
Ornateness bland it ex enc, est yeti am bongo detract re.
{{</hint>}}
Attributes
iconoptionalstring
Icon to use. The value need to be an icon from an SVG sprite.
Default:none
titleoptionalstring
Title text of the hint.
Default:none
typeoptionalstring
Type of the hint. Supported values are note|tip|important|caution|warning.
Default:note
Example
Markdown content Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re.
Markdown content Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re.
Markdown content Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re.
Markdown content Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re.
Markdown content Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re.
Romanesque acclimates investiture.
Example with a custom icon and title:
GitHub
Markdown content Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re.
Icon
Simple shortcode to include icons from SVG sprites outside of menus.
Usage
{{<icon"thumbs-up">}}
Example
Output
Code
{{< icon "thumbs-up" >}}
{{< icon "thumbs-down" >}}
{{< icon "laugh" >}}
{{< icon "lemon" >}}
{{< icon "moon" >}}
Tabs
Tabs let you organize content by context, for example installation instructions for each supported platform.
Usage
{{<tabs"uniqueid">}}{{<tab"macOS">}} # macOS Content {{</tab>}}{{<tab"Linux">}} # Linux Content {{</tab>}}{{<tab"Windows">}} # Windows Content {{</tab>}}{{</tabs>}}
Example
macOS
This is tab macOS content.
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo.
Linux
This is tab Linux content.
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo.
Windows
This is tab Windows content.
Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent.
Boxes
Boxes can be used to create a simple grid.
Usage
{{<boxes"contact">}}{{<boxsize=large[title=E-Mailicon=gblog_email]>}}mail@example.com{{</box>}}{{<boxsize=largetitle=Matrixicon=gblog_matrix>}}@john:example.com{{</box>}}{{<boxsize=largetitle=XMPPicon=gblog_xmpp>}}john@example.com{{</box>}}{{<boxsize=largetitle=Others>}}You can also find us on the Fediverse.{{</box>}}{{</boxes>}}
Attributes
iconoptionalstring
Icon to use. The value need to be an icon from an SVG sprite.
Default:none
sizeoptionalstring
Size of each box. Supported values are regular|large.
Mermaid is library for generating SVG charts and diagrams from text.
Usage
{{<mermaidclass="text-center">}}sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
{{</mermaid>}}
Attributes
classoptionallist
List of space-separated CSS class names to apply.
Default:none
Example
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
As an alternative to shortcodes, code blocks can be used for markdown as well.
```mermaid
flowchart LR
A[Hard] -->|Text| B(Round)
B --> C{Decision}C -->|One| D[Result 1]
C -->|Two| E[Result 2]
```
flowchart LR
A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
KaTeX
KaTeX shortcode let you render math typesetting in markdown document.
Icon to use. The value need to be an icon from an SVG sprite.
Default:none
titleoptionalstring
Title text of the progress bar.
Default:none
valueoptionalinteger
Progress value.
Default:0
Example
Eating
65 %
Properties
The property list shortcode creates a custom HTML description list that can be used to display properties or variables and general dependent information. The shortcode requires a data file in data/properties/, e.g. data/properties/demo.yaml.
---properties:- name:prop1type:stringdescription:Dummy description of the prop1 string property.required:true- name:prop2type:intdefaultValue:10description:Another description for the integer property called prop2.required:falsetags:- tag1- tag2- name:prop3type:booldefaultValue:falsedescription:| A `bool` property with a complex multiline description and embedded Markdown:
- List item 1
- List item 2
More description how to use this property.required:false- name:a-proptype:stringdescription:Property to demonstrate sorting.required:true
Attributes
namerequiredstring
Name of the file from the data/properties/ directory.
Default:none
orderoptionalstring
Sort order, only applied if sort is set. Supported values are asc|desc.
Default:asc
sortoptionalstring
Field name to use for sorting.
Default:none
Example
a-proprequiredstring
Property to demonstrate sorting.
Default:none
prop1requiredstring
Dummy description of the prop1 string property.
Default:none
prop2optionalinttag1tag2
Another description for the integer property called prop2.
Default:10
prop3optionalbool
A bool property with a complex multiline description and embedded Markdown: