themes/hugo-coder/exampleSite/content/posts/markdown-syntax.md

9753fe49cd0d54307282dd7054d079cb47e24d5a · 3.8 KB · 148 lines raw

1 +++
2 author = "Hugo Authors"
3 title = "Markdown Syntax Guide"
4 date = "2019-03-11"
5 description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
6 tags = [
7 "markdown",
8 "css",
9 "html",
10 ]
11 categories = [
12 "themes",
13 "syntax",
14 ]
15 series = ["Themes Guide"]
16 aliases = ["migrate-from-jekyl"]
17 +++
18
19 This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
20 <!--more-->
21
22 ## Headings
23
24 The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
25
26 # H1
27 ## H2
28 ### H3
29 #### H4
30 ##### H5
31 ###### H6
32
33 ## Paragraph
34
35 Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
36
37 Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
38
39 ## Blockquotes
40
41 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.
42
43 #### Blockquote without attribution
44
45 > Tiam, ad mint andaepu dandae nostion secatur sequo quae.
46 > **Note** that you can use *Markdown syntax* within a blockquote.
47
48 #### Blockquote with attribution
49
50 > Don't communicate by sharing memory, share memory by communicating.<br>
51 > — <cite>Rob Pike[^1]</cite>
52
53 [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
54
55 ## Tables
56
57 Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-box.
58
59 Name | Age
60 --------|------
61 Bob | 27
62 Alice | 23
63
64 #### Inline Markdown within tables
65
66 | Italics | Bold | Code |
67 | -------- | -------- | ------ |
68 | *italics* | **bold** | `code` |
69
70 ## Code Blocks
71
72 #### Code block with backticks
73
74 ```html
75 <!doctype html>
76 <html lang="en">
77 <head>
78 <meta charset="utf-8">
79 <title>Example HTML5 Document</title>
80 </head>
81 <body>
82 <p>Test</p>
83 </body>
84 </html>
85 ```
86
87 #### Code block indented with four spaces
88
89 <!doctype html>
90 <html lang="en">
91 <head>
92 <meta charset="utf-8">
93 <title>Example HTML5 Document</title>
94 </head>
95 <body>
96 <p>Test</p>
97 </body>
98 </html>
99
100 #### Code block with Hugo's internal highlight shortcode
101 {{< highlight html >}}
102 <!doctype html>
103 <html lang="en">
104 <head>
105 <meta charset="utf-8">
106 <title>Example HTML5 Document</title>
107 </head>
108 <body>
109 <p>Test</p>
110 </body>
111 </html>
112 {{< /highlight >}}
113
114 ## List Types
115
116 #### Ordered List
117
118 1. First item
119 2. Second item
120 3. Third item
121
122 #### Unordered List
123
124 * List item
125 * Another item
126 * And another item
127
128 #### Nested list
129
130 * Fruit
131 * Apple
132 * Orange
133 * Banana
134 * Dairy
135 * Milk
136 * Cheese
137
138 ## Other Elements — abbr, sub, sup, kbd, mark
139
140 <abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
141
142 H<sub>2</sub>O
143
144 X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
145
146 Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
147
148 Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.