Markdown on Hugo
Table of Contents
This article provides an example of basic Markdown syntax as used in Hugo, which differs slightly from standard Markdown.
All content in our blog is rendered from these Markdown files.
#
Headings
You should using ## H2
as your section title, since the file title is # H1
.
### H3
#### H4
##### H5
#
Blockquotes
The blockquote element represents content that is quoted from another source.
##
Blockquote without attribution
You can still use Markdown syntax within a blockquote.
Welcome to TechFounders
Note that you can use Markdown syntax within a blockquote.
#
Tables
Hugo supports supports Table, but the syntax is totally different to original markdown.
Name | Age |
---|---|
Bob | 27 |
Alice | 23 |
Code in Hugo Markdown:
Name | Age
--------|------
Bob | 27
Alice | 23
##
Inline Markdown within tables
Inline | Markdown | In | Table |
---|---|---|---|
italics | bold | code |
Code in Hugo Markdown:
Inline | Markdown | In | Table
---------- | --------- | ----------------- | ----------
*italics* | **bold** | ~~strikethrough~~ | `code`
#
Code Blocks
##
Code block with backticks and showing highlighted lines
|
|
Code in Hugo Markdown: here, you should open the .md
file to see the original code.
##
Code block with Hugo’s internal highlight shortcode
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
Code in Hugo Markdown: here, you should open the .md
file to see the original code.
#
List Types
##
Ordered List
- First item
- Second item
- Third item
<!-- code in Hugo Markdown-->
1. First item
2. Second item
3. Third item
##
Unordered List
- List item
- Another item
- And another item
<!-- code in Hugo Markdown-->
- List item
- Another item
- And another item
##
Nested list
- Item
-
First Sub-item
-
Second Sub-item
<!-- code in Hugo Markdown-->
- Item
1. First Sub-item
2. Second Sub-item
#
Other Elements with HTML Syntax
-
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.