|
| 1 | ++++ |
| 2 | +title = "Markdown Syntax Guide" |
| 3 | +description = """Sample article showcasing basic Markdown syntax and \ |
| 4 | + formatting for HTML elements.""" |
| 5 | +draft = false |
| 6 | +date = "2023-07-28" |
| 7 | +author = "Hugo Authors" |
| 8 | +tags = ["markdown", "xterm", "css", "html"] |
| 9 | +categories = ["themes", "syntax"] |
| 10 | ++++ |
| 11 | + |
| 12 | +This article offers a sample of basic Markdown syntax that can be used in Hugo |
| 13 | +content files, also it shows whether basic HTML elements are decorated with |
| 14 | +CSS in a Hugo theme. |
| 15 | + |
| 16 | +Headings |
| 17 | +-------- |
| 18 | + |
| 19 | +The following HTML `<h1>`—`<h6>` elements represent six levels of section |
| 20 | +headings. `<h1>` is the highest section level while `<h6>` is the lowest. |
| 21 | + |
| 22 | +<!-- markdownlint-disable --> |
| 23 | +# H1 |
| 24 | + |
| 25 | +## H2 |
| 26 | +<!-- markdownlint-enable --> |
| 27 | + |
| 28 | +### H3 |
| 29 | + |
| 30 | +#### H4 |
| 31 | + |
| 32 | +##### H5 |
| 33 | + |
| 34 | +###### H6 |
| 35 | + |
| 36 | +Paragraph |
| 37 | +--------- |
| 38 | + |
| 39 | +Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, |
| 40 | +voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma |
| 41 | +dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as |
| 42 | +cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? |
| 43 | +Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, |
| 44 | +sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos |
| 45 | +evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, |
| 46 | +ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores |
| 47 | +editium rerore eost, temped molorro ratiae volorro te reribus dolorer |
| 48 | +sperchicium faceata tiustia prat. |
| 49 | + |
| 50 | +Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne |
| 51 | +sapicia is sinveli squiatum, core et que aut hariosam ex eat. |
| 52 | + |
| 53 | +Blockquotes |
| 54 | +----------- |
| 55 | + |
| 56 | +The blockquote element represents content that is quoted from another source, |
| 57 | +optionally with a citation which must be within a `footer` or `cite` element, |
| 58 | +and optionally with in-line changes such as annotations and abbreviations. |
| 59 | + |
| 60 | +### Blockquote without attribution |
| 61 | + |
| 62 | +> Tiam, ad mint andaepu dandae nostion secatur sequo quae. |
| 63 | +> __Note__ that you can use _Markdown syntax_ within a blockquote. |
| 64 | +
|
| 65 | +Tables |
| 66 | +------ |
| 67 | + |
| 68 | +Tables aren't part of the core Markdown spec, but Hugo supports them |
| 69 | +out-of-the-box. |
| 70 | + |
| 71 | +| Name | Age | |
| 72 | +| ----- | --- | |
| 73 | +| Bob | 27 | |
| 74 | +| Alice | 23 | |
| 75 | + |
| 76 | +### Inline Markdown within tables |
| 77 | + |
| 78 | +| Italics | Bold | Code | |
| 79 | +| --------- | -------- | ------ | |
| 80 | +| _italics_ | __bold__ | `code` | |
| 81 | + |
| 82 | +Code Blocks |
| 83 | +----------- |
| 84 | + |
| 85 | +### Inline Code |
| 86 | + |
| 87 | +`This is Inline Code` |
| 88 | + |
| 89 | +### Code block with backticks |
| 90 | + |
| 91 | +<!-- markdownlint-disable --> |
| 92 | +``` |
| 93 | +<!DOCTYPE html> |
| 94 | +<html lang="en"> |
| 95 | + <head> |
| 96 | + <meta charset="utf-8" /> |
| 97 | + <title>Example HTML5 Document</title> |
| 98 | + </head> |
| 99 | + <body> |
| 100 | + <p>Test</p> |
| 101 | + </body> |
| 102 | +</html> |
| 103 | +``` |
| 104 | +<!-- markdownlint-enable --> |
| 105 | + |
| 106 | +### Code block with backticks, language & attributes (lineno) specified |
| 107 | + |
| 108 | +```html {linenos=true} |
| 109 | +<!DOCTYPE html> |
| 110 | +<html lang="en"> |
| 111 | + <head> |
| 112 | + <meta charset="utf-8" /> |
| 113 | + <title>Example HTML5 Document</title> |
| 114 | + <meta name="description" content="Sample article showcasing basic |
| 115 | + Markdown syntax and formatting for HTML elements."> |
| 116 | + </head> |
| 117 | + <body> |
| 118 | + <p>Test</p> |
| 119 | + </body> |
| 120 | +</html> |
| 121 | +``` |
| 122 | + |
| 123 | +<!-- markdownlint-disable --> |
| 124 | + |
| 125 | +### Code block indented with four spaces |
| 126 | + |
| 127 | + <!doctype html> |
| 128 | + <html lang="en"> |
| 129 | + <head> |
| 130 | + <meta charset="utf-8"> |
| 131 | + <title>Example HTML5 Document</title> |
| 132 | + </head> |
| 133 | + <body> |
| 134 | + <p>Test</p> |
| 135 | + </body> |
| 136 | + </html> |
| 137 | + |
| 138 | +### Code block with Hugo's internal highlight shortcode |
| 139 | + |
| 140 | +{{< highlight html >}} |
| 141 | + |
| 142 | +<!doctype html> |
| 143 | +<html lang="en"> |
| 144 | +<head> |
| 145 | + <meta charset="utf-8"> |
| 146 | + <title>Example HTML5 Document</title> |
| 147 | +</head> |
| 148 | +<body> |
| 149 | + <p>Test</p> |
| 150 | +</body> |
| 151 | +</html> |
| 152 | + |
| 153 | +{{< /highlight >}} |
| 154 | + |
| 155 | +<!-- markdownlint-enable --> |
| 156 | + |
| 157 | +### Gist |
| 158 | + |
| 159 | +{{< gist spf13 7896402 >}} |
| 160 | + |
| 161 | +List Types |
| 162 | +---------- |
| 163 | + |
| 164 | +### Ordered List |
| 165 | + |
| 166 | +1. First item |
| 167 | +2. Second item |
| 168 | +3. Third item |
| 169 | + |
| 170 | +### Unordered List |
| 171 | + |
| 172 | +- List item |
| 173 | +- Another item |
| 174 | +- And another item |
| 175 | + |
| 176 | +### Nested list |
| 177 | + |
| 178 | +- Fruit |
| 179 | + + Apple |
| 180 | + + Orange |
| 181 | + + Banana |
| 182 | +- Dairy |
| 183 | + + Milk |
| 184 | + + Cheese |
0 commit comments