Rendering effect of Markdown syntax
Introduce the Jekyll Theme ACG theme's support and usage of Markdown syntax.

Rendering effect of Markdown syntax

My English is poor. In the event of any discrepancy, the Simplified Chinese post shall prevail.

Introduction

John Gruber and Aaron Swartz created Markdown in 2004 as a markup language that is appealing to human readers in its source code form.[9]

Markdown is a lightweight markup language for creating formatted text using a plain-text editor.

Markdown is widely used in blogging, instant messaging, online forums, collaborative software, documentation pages, and readme files.

—— Wikipedia

The Markdown syntax standard supported by Github is called GitHub Flavored Markdown, or GFM for short. Jekyll Theme ACG supports some other features besides GFM syntax.

List

Unordered list

- A
  - a
    - i
    - ii
  - b
    - I
    - II
- B

Ordered list

1. A
   1. a
   1. b
   1. c
2. B
3. C
  1. A
    1. a
    2. b
    3. c
  2. B
  3. C

Unordered numbers will automatically become ordered.

To do list

- [x] TODO 1
- [ ] TODO 2
- [x] TODO 3
- [ ] TODO 4

Table

Standard table

# Examples of tables in standard Markdown syntax
| Column A | Column B | Column C |
| :------- | :------: | -------: |
|   Left   |  Center  |  Right   |
|    A     |    B     |    C     |
Column A Column B Column C
Left Center Right
A B C

Ignore headers and alignment

Unlike standard Markdown syntax, the header and alignment of the table can be omitted.

| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
1 2 3
4 5 6
7 8 9

Custom alignment

# Each cell can use `:` to control its own alignment.
| ########## | ########## | ########## |
|:   Left    |:  Center  :|   Right   :|
|:  Center  :|   Right   :|:   Left    |
|   Right   :|:   Left    |:  Center  :|
########## ########## ##########
Left Center Right
Center Right Left
Right Left Center

Combine table columns

# The cells between `||` will be merged.
| 1 | 2 | 3 |
|: 45 :|| 6 |
|: 789   :|||
1 2 3
45 6
789

Combine table rows

# The cells beginning with `^^` will be merged.
| 1 | 2 |  3  |
| 4  5 ||^^ 6 |
|^^ 7 8||  9  |
1 2 3
6
4 5
7 8
9

Code

Single line of code

Multiple lines of code

```javascript
function print() {
  console.log("Hello world.");
}
print(); // Hello world.
```
function print() {
  console.log("Hello world.");
}
print(); // Hello world.

Picture

Normal picture

Modify the style of the picture

![picture](https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/pixiv86925095.png){: style="width: 128px; height: 128px; object-fit: cover; float: right; animation: spin 10s linear infinite;" class="m-2 rounded-full" }

- There is a very long paragraph here. There is a very long paragraph here. There is a very long paragraph here. There is a very long paragraph here. There is a very long paragraph here. There is a very long paragraph here. There is a very long paragraph here. There is a very long paragraph here. There is a very long paragraph here. There is a very long paragraph here.

Not only for images, but with the format of {: key="value" }, you can add HTML attributes to elements in Markdown. The examples here even produced animation effects.

Mathematical formula

In-line formula

Block-level formula

$$ ax^2 + bx + c = 0 \quad (a \neq 0)  $$

$$ x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
\[ax^2 + bx + c = 0 \quad (a \neq 0)\] \[x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}\]

Others

Slanted text

Bold text

Deleted text

Dividing line

*****

On a single line, use more than three - or * in a row to generate dividing lines. it is recommended to use * to generate dividing lines, because --- will be recognized as Front Matter.

Quote

> Usually used to quote a piece of content elsewhere.
> The content of ordinary line breaks will be attached to the end of the previous line.
>
> Leave a blank line in the quote to wrap the line.
>
> > Nesting of references.

Usually used to quote a piece of content elsewhere. The content of ordinary line breaks will be attached to the end of the previous line.

Leave a blank line in the quote to wrap the line.

Nesting of references.

Footnote

- The first sentence has an example footnote one. [^footnote1]

[^footnote1]: Explain the object of footnote one.

- The second sentence has an example footnote two. [^footnote2]

[^footnote2]: Explain the object of footnote two.

Keyboard buttons

Emoji

More emoji: emoji-cheat-sheet

  1. Explain the object of footnote one. 

  2. Explain the object of footnote two. 

Jekyll Theme ACG 主题使用指南 Markdown 语法的渲染效果