Markdown Syntax Guide

Markdown Syntax Guide

January 1, 2020·imfing
imfing
Octocat
Octocat

This article offers a sample of basic Markdown syntax that can be used in Hugo content files.

Basic Syntax

Headings

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Emphasis

*This text will be italic*
_This will also be italic_

**This text will be bold**
__This will also be bold__

_You **can** combine them_

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

* Item 1
* Item 2
  * Item 2a
  * Item 2b
  • Item 1
  • Item 2
    • Item 2a
    • Item 2b

Ordered

1. Item 1
2. Item 2
3. Item 3
   1. Item 3a
   2. Item 3b

Images

![GitHub Logo](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png)

GitHub Logo

Links

[Hugo](https://gohugo.io)

Hugo

Blockquotes

As Newton said:

> If I have seen further it is by standing on the shoulders of Giants.

If I have seen further it is by standing on the shoulders of Giants.

Inline Code

Inline `code` has `back-ticks around` it.

Inline code has back-ticks around it.

Code Blocks

Syntax Highlighting

```go
func main() {
    fmt.Println("Hello World")
}
```
func main() {
    fmt.Println("Hello World")
}

Tables

| Syntax    | Description |
| --------- | ----------- |
| Header    | Title       |
| Paragraph | Text        |
SyntaxDescription
HeaderTitle
ParagraphText

Shortcodes

  • Cards
  • Callouts
    ℹ️
    Please visit GitHub to see the latest releases.
🌐
Hugo can be used to create a wide variety of websites, including blogs, portfolios, documentation sites, and more.
⚠️
A callout is a short piece of text intended to attract attention.
🚫
Something went wrong and it’s going to explode.
  • Details
Details

This is the content of the details.

Markdown is supported.

Click me to reveal
This will be hidden by default.
  • Filetree
    • _index.md
      • _index.md
      • introduction.md
      • introduction.fr.md
  • hugo.toml
    • Icon
    • Steps

    Step 1

    This is the first step.

    Step 2

    This is the second step.

    • Tabs

    iframe

    • qq music
    • gamma
    • xmind
    • youtube

    Diagrams

    • mermaid
    graph TD;
        A-->B;
        A-->C;
        B-->D;
        C-->D;
    • drawio
    test drawio diagram
    • excalidraw
    test excalidraw diagram

    figure

    A sample digit from the MNIST database.

    A sample digit from the MNIST database.

    Gallery

    引入 hugo-easy-gallery 提供支持

    • local image gallery use image file name as caption.

    • specific image url gallery

    References

    最后更新于