This example markdown was adapted from here, which was probably sourced from here, and now edited by me to fit my preferences and Hugo’s feature set.
Basic Markdown Formatting
Headings
1# This is an <h1> tag
2## This is an <h2> tag
3### This is an <h3> tag
4#### This is an <h4> tag
5##### This is an <h5> tag
6###### This is an <h6> tag
Emphasis
1*This text will be italic*
2_This will also be italic_
3
4**This text will be bold**
5__This will also be bold__
6
7_You **can** combine them_
Result:
This text will be italic
This will also be italic
This text will be bold
This will also be bold
You can combine them
Lists
Unordered:
Result:
- Milk
- Bread
- Wholegrain
- Butter
Ordered:
Result:
- Tidy the kitchen
- Prepare ingredients
- Cook delicious things
Images
1
2{style="width: 200px;"}
Result:
Links
1[link](http://example.com)
Result:
Blockquotes
Result:
As Kanye West said:
We’re living the future so the present is our past.
Horizontal Rules
1---
Result:
Code Snippets
```css
.my-link {
text-decoration: underline;
}
```
Result:
Escaping
1\*literally\*
Result:
*literally*
Embedding HTML
1<button style="font-size:2em; padding:1em 2em;">Big Button</button>
Result:
Advanced Markdown
Note: Some syntax which is not standard to native Markdown. They’re extensions of the language.
Strike-throughs
1~~deleted words~~
Result:
deleted words
Automatic Links
1https://cjshearer.dev
Result:
Markdown Footnotes
1The quick brown fox[^1] jumped over the lazy dog[^2].
2
3[^1]: Foxes are red
4[^2]: Dogs are usually not red
Result:
The quick brown fox1 jumped over the lazy dog2.
GitHub Flavored Markdown
Syntax Highlighting
```js
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}
```
Result:
Task Lists
1- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported
2- [x] list syntax required (any unordered or ordered list supported)
3- [x] this is a complete item
4- [ ] this is an incomplete item
Result:
- @mentions, #refs, links, formatting, and
tagssupported - list syntax required (any unordered or ordered list supported)
- this is a complete item
- this is an incomplete item
Tables
You can create tables by assembling a list of words and dividing them with hyphens -
(for the first row), and then separating each column with a pipe |
:
First Header | Second Header |
---|---|
Content from cell 1 | Content from cell 2 |
Content in the first column | Content in the second column |