| | |
| | | +++ |
| | | authors = ["Hugo Authors"] |
| | | authors = ["Lone Coder"] |
| | | title = "Markdown Syntax Guide" |
| | | date = "2019-03-11" |
| | | date = "2023-07-13" |
| | | description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." |
| | | tags = [ |
| | | "hugo", |
| | | "markdown", |
| | | "css", |
| | | "html", |
| | | ] |
| | | categories = [ |
| | | "themes", |
| | | "theme demo", |
| | | "syntax", |
| | | ] |
| | | series = ["Themes Guide"] |
| | | series = ["Theme Demo"] |
| | | aliases = ["migrate-from-jekyl"] |
| | | +++ |
| | | |
| | | 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. |
| | | |
| | | <!--more--> |
| | | |
| | | ## Headings |
| | |
| | | The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest. |
| | | |
| | | # H1 |
| | | |
| | | ## H2 |
| | | |
| | | ### H3 |
| | | |
| | | #### H4 |
| | | |
| | | ##### H5 |
| | | |
| | | ###### H6 |
| | | |
| | | ## Paragraph |
| | |
| | | #### Blockquote without attribution |
| | | |
| | | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. |
| | | > **Note** that you can use *Markdown syntax* within a blockquote. |
| | | > **Note** that you can use _Markdown syntax_ within a blockquote. |
| | | |
| | | #### Blockquote with attribution |
| | | |
| | |
| | | |
| | | Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-box. |
| | | |
| | | Name | Age |
| | | --------|------ |
| | | Bob | 27 |
| | | Alice | 23 |
| | | | Name | Age | |
| | | | ----- | --- | |
| | | | Bob | 27 | |
| | | | Alice | 23 | |
| | | |
| | | #### Inline Markdown within tables |
| | | |
| | | | Italics | Bold | Code | |
| | | | -------- | -------- | ------ | |
| | | | *italics* | **bold** | `code` | |
| | | | --------- | -------- | ------ | |
| | | | _italics_ | **bold** | `code` | |
| | | |
| | | ## Code Blocks |
| | | |
| | | #### Code block with backticks |
| | | |
| | | ```html |
| | | <!doctype html> |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>Example HTML5 Document</title> |
| | | </head> |
| | | <body> |
| | | <p>Test</p> |
| | | </body> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>Example HTML5 Document</title> |
| | | </head> |
| | | <body> |
| | | <p>Test</p> |
| | | </body> |
| | | </html> |
| | | ``` |
| | | |
| | |
| | | </html> |
| | | |
| | | #### Code block with Hugo's internal highlight shortcode |
| | | |
| | | {{< highlight html >}} |
| | | |
| | | <!doctype html> |
| | | <html lang="en"> |
| | | <head> |
| | |
| | | |
| | | #### Unordered List |
| | | |
| | | * List item |
| | | * Another item |
| | | * And another item |
| | | - List item |
| | | - Another item |
| | | - And another item |
| | | |
| | | #### Nested list |
| | | |
| | | * Fruit |
| | | * Apple |
| | | * Orange |
| | | * Banana |
| | | * Dairy |
| | | * Milk |
| | | * Cheese |
| | | - Fruit |
| | | - Apple |
| | | - Orange |
| | | - Banana |
| | | - Dairy |
| | | - Milk |
| | | - Cheese |
| | | |
| | | #### Foot Notes |
| | | |