The following markdown file showcases all the features one can achieve within markdown and with Hugo shortcodes.
MARKDOWN FORMAT Link to heading
Headings Link to heading
The following HTML <h1>
β<h6>
elements represent six levels of section headings. <h1>
is the highest section level while <h6>
is the lowest.
H1 Link to heading
H2 Link to heading
H3 Link to heading
H4 Link to heading
H5 Link to heading
H6 Link to heading
Paragraphs are separated by enters.
Emphasis Link to heading
Italics with underscores.
Bold with asterisks.
Combined emphasis with asterisks and underscores.
Strikethrough with two tildes.
Blockquotes:
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer
or cite
element, and optionally with in-line changes such as annotations and abbreviations.
This is a blockquote with a >.
This is a blockquote with a tab.
Blockquote without attribution Link to heading
Tiam, ad mint andaepu dandae nostion secatur sequo quae. Note that you can use Markdown syntax within a blockquote.
Blockquote with attribution Link to heading
Don’t communicate by sharing memory, share memory by communicating.
β Rob Pike1
Horizontal line using ***
Footnote Link to heading
I have more 2 to say.
Lists Link to heading
Ordered List Link to heading
- First item
- Second item
- Third item
Unordered List Link to heading
- List item
- Another item
- And another item
Nested list Link to heading
- Fruit
- Apple
- Orange
- Banana
- Dairy
- Milk
- Cheese
Todo Link to heading
Todo lists can be written by using the standard Markdown syntax:
- Write math example
- Write diagram example
- Do something else
Links Link to heading
Link to a page Link to heading
A relative link from one post to another post
A link to heading on this page
Figures Link to heading
The only correct way to insert images from static/images:
![1](/images/polyu-logo.png)
Tables Link to heading
Tables aren’t part of the core Markdown spec, but Hugo supports them out-of-the-box.
Name | Age |
---|---|
Bob | 27 |
Alice | 23 |
Inline Markdown within tables Link to heading
Italics | Bold | Code3 |
---|---|---|
italics | bold | code |
huh | analyzability | English | Arabic | Chinese |
---|---|---|---|---|
0 | analyzable | 111 | 50 | 99 |
1 | unanalyzable | 39 | 32 | 20 |
2 | semi-analyzable | 3 | 4 | 1 |
Code Blocks Link to heading
Code block with backticks Link to heading
#Roman numerals
def roman(num: int) -> str:
chlist = "VXLCDM"
rev = [int(ch) for ch in reversed(str(num))]
chlist = ["I"] + [chlist[i % len(chlist)] + "\u0304" * (i // len(chlist))
for i in range(0, len(rev) * 2)]
Code block indented with four spaces Link to heading
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block with Hugo’s internal highlight shortcode Link to heading
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
Other Elements Link to heading
β abbr, sub, sup, kbd, mark Link to heading
GIF is a bitmap image format.
H2O
Xn + Yn = Zn
Press CTRL+ALT+Delete to end the session.
Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures.
Emoji: β€οΈ
https://www.webfx.com/tools/emoji-cheat-sheet/
SHORTCODES Link to heading
Columns Link to heading
One Link to heading
This is one.
Two Link to heading
This is two.
Buttons Link to heading
Buttons are styled links that can lead to local page or external link.
{{< button relref="/" [class="..."] >}}Get Home{{< /button >}}
{{< button href="https://github.com/alex-shpak/hugo-book" >}}Contribute{{< /button >}}
Example Link to heading
Hints Link to heading
Hint shortcode can be used as hint/alerts/notification block.
There are 3 colors to choose: info
, warning
and danger
.
{{< hint [info|warning|danger] >}}
**Markdown content**
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
{{< /hint >}}
Example Link to heading
Markdown content
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
Markdown content
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
Markdown content
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
KaTeX Link to heading
KaTeX shortcode let you render math typesetting in markdown document. See KaTeX
Example Link to heading
{{< katex [display] [class="text-center"] >}}
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{< /katex >}}
Display Mode Example Link to heading
Here is some inline example: \(\pi(x)\)
, rendered in the same line. And below is display
example, having display: block
\[f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi\]
Text continues here.
Details Link to heading
Details shortcode is a helper for details
html5 element. It is going to replace expand
shortcode.
Example Link to heading
{{< details "Title" [open] >}}
## Markdown content
Lorem markdownum insigne...
{{< /details >}}
{{< details title="Title" open=true >}}
## Markdown content
Lorem markdownum insigne...
{{< /details >}}
Title
Markdown content Link to heading
Lorem markdownum insigne…
Tabs Link to heading
Tabs let you organize content by context, for example installation instructions for each supported platform.
{{< tabs "uniqueid" >}}
{{< tab "MacOS" >}} # MacOS Content {{< /tab >}}
{{< tab "Linux" >}} # Linux Content {{< /tab >}}
{{< tab "Windows" >}} # Windows Content {{< /tab >}}
{{< /tabs >}}
Example Link to heading
MacOS Link to heading
This is tab MacOS content.
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa protulit, sed sed aere valvis inhaesuro Pallas animam: qui quid, ignes. Miseratus fonte Ditis conubia.
Linux Link to heading
This is tab Linux content.
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa protulit, sed sed aere valvis inhaesuro Pallas animam: qui quid, ignes. Miseratus fonte Ditis conubia.
Windows Link to heading
This is tab Windows content.
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa protulit, sed sed aere valvis inhaesuro Pallas animam: qui quid, ignes. Miseratus fonte Ditis conubia.
Mermaid Chart Link to heading
MermaidJS is library for generating svg charts and diagrams from text.
Override Mermaid Initialization Config
To override the initialization config for Mermaid, create a
mermaid.json
file in yourassets
folder!
Example Link to heading
{{< mermaid [class="text-center"]>}}
stateDiagram-v2
State1: The state with a note
note right of State1
Important information! You can write
notes.
end note
State1 --> State2
note left of State2 : This is the note to the left.
{{< /mermaid >}}
stateDiagram-v2 State1: The state with a note note right of State1 Important information! You can write notes. end note State1 --> State2 note left of State2 : This is the note to the left.
Icons Link to heading
Fork-Awesome Icons, use them with html inputs like this, direcly in a md file:
<i class="fa fa-1x fa-rebel"></i>
https://forkaweso.me/Fork-Awesome/icons/
Centering Link to heading
Centered text
Gallery Link to heading
Youtube embedding Link to heading
{{< youtube 16_NYHUZ1kM >}}
https://www.innoq.com/en/blog/markdown-with-zotero-workflow/
Cite Link to heading
Use CNTRL + ALT + Z to cite from Zotero
Typography Link to heading
Plotly Link to heading
1
βWhat I like to drink most is wine that belongs to others.β
β Diogenes, 4th century BC