Post

Use Markdown

Examples of using Markdown

Use Markdown

Link to Chirpy

1
Link to [Chirpy](https://chirpy.cotes.page)

Link to Writing a New Post. Footnote1 here 1

https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/_posts/2019-08-08-write-a-new-post.md?plain=1

Link to Text and Typography. Footnote2 here 2

https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/_posts/2019-08-08-text-and-typography.md?plain=1



Link to Use Jekyll

Jekyll is a static site generator that transforms plain text into static websites and blogs. When used together with Markdown, Jekyll allows users to write content in a simple, readable format that can be easily converted into HTML. Markdown’s straightforward syntax makes it easy to format text, create lists, add links, and include code snippets, while Jekyll handles the layout and structure of the site. This combination provides a powerful yet user-friendly way to create and manage static websites.

Headings

1
2
3
4
5
6
# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

Emphasis

italic or italic
bold or bold
bold and italic or bold and italic
This is bold text using HTML syntax.

This is strikethrough text.

1
2
3
4
5
6
*italic* or _italic_ <br>
**bold** or __bold__ <br>
***bold and italic*** or ___bold and italic___ <br>
This is <strong>bold</strong> text using HTML syntax. <br>

~~This is strikethrough text.~~

Ordered list

  1. Firstly
  2. Secondly
  3. Thirdly
1
2
3
1. Firstly
2. Secondly
3. Thirdly

Unordered list

  • Chapter
    • Section 1
      • Paragraph 1
    • Section 2
      • Paragraph 2
1
2
3
4
5
- Chapter
  - Section 1
    - Paragraph 1
  - Section 2
    - Paragraph 2

ToDo list

  • Job
    • Step 1
    • Step 2
      • Step 2.1
      • Step 2.2
    • Step 3
1
2
3
4
5
6
- [ ] Job
  - [x] Step 1
  - [ ] Step 2
    - [x] Step 2.1
    - [ ] Step 2.2
  - [ ] Step 3

Description list

Term 1
Definition of term 1
Term 2
Wrong definition of term 2
1
2
3
4
5
***Term 1***
: _Definition of term 1_   

**Term 2**
: ~~Wrong definition of term 2~~

Tables

Header 1Header 2
Row 1 Col 1Row 1 Col 2
Row 2 Col 1Row 2 Col 2
1
2
3
4
| Header 1 | Header 2 |
| -------- | -------- |
| Row 1 Col 1 | Row 1 Col 2 |
| Row 2 Col 1 | Row 2 Col 2 |
Left AlignedCenter AlignedRight Aligned
Row 1 Col 1Row 1 Col 2Row 1 Col 3
Row 2 Col 1Row 2 Col 2Row 2 Col 3
1
2
3
4
| Left Aligned | Center Aligned | Right Aligned |
|:------------ |:--------------:| -------------:|
| Row 1 Col 1  | Row 1 Col 2    | Row 1 Col 3   |
| Row 2 Col 1  | Row 2 Col 2    | Row 2 Col 3   |

Block Quote

This line shows the block quote.

This line shows the nested block quote.

This line shows the nested block quote.

This line shows the nested block quote.

This line shows the nested block quote.
This line shows the nested block quote.

1
2
3
4
5
6
7
8
> This line shows the _block quote_.  

>> This line shows the _nested block quote_.  
>>> This line shows the _nested block quote_.

>> This line shows the _nested block quote_.  
>>>> This line shows the _nested block quote_.  
>>> This line shows the _nested block quote_.  

Prompts

An example showing the tip type prompt.

An example showing the info type prompt.

An example showing the warning type prompt.

An example showing the danger type prompt.

1
2
3
4
5
6
7
8
9
10
11
> An example showing the `tip` type prompt.
{: .prompt-tip }

> An example showing the `info` type prompt.
{: .prompt-info }

> An example showing the `warning` type prompt.
{: .prompt-warning }

> An example showing the `danger` type prompt.
{: .prompt-danger }

Inline Code

This is an example of Inline Code.

1
This is an example of `Inline Code`.

Filepath

Here is the /path/to/the/file.extend.

1
Here is the `/path/to/the/file.extend`{: .filepath}.

Code blocks

1
2
This is a common code snippet, 
without syntax highlight and line number.
1
2
3
4
```text
This is a common code snippet, 
without syntax highlight and line number.
```

Line Number

By default, all languages except plaintext, console, and terminal will display line numbers. Add the class nolineno to hide the line numbers:

1
2
This is a common code snippet, 
without syntax highlight and line number.
1
2
3
4
5
```text
This is a common code snippet, 
without syntax highlight and line number.
```
{: .nolineno }

Specific Language

Using ```{language} you will get a code block with syntax highlight:

1
2
3
4
5
x = 10
if x > 5:
    print("x is greater than 5")
else:
    print("x is not greater than 5") 
1
2
3
4
5
6
7
```python
x = 10
if x > 5:
    print("x is greater than 5")
else:
    print("x is not greater than 5") 
```

Specific filename

1
2
3
@import
  "colors/light-typography",
  "colors/dark-typography";
1
2
3
4
5
6
```sass
@import
  "colors/light-typography",
  "colors/dark-typography";
```
{: file='_sass/jekyll-theme-chirpy.scss'}

Liquid Codes

1
2
3
4
5
```liquid
{% if product.title contains 'Pack' %}
  This product's title contains the word Pack.
{% endif %}
```

Math & LaTeX

The mathematics powered by MathJax:

This is a displayed equation:
\(a^2 + b^2 = c^2\)

1
2
3
4
This is a displayed equation:   
$$
a^2 + b^2 = c^2
$$

When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are: \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\)

1
2
When $$a \ne 0$$, there are two solutions to $$ax^2 + bx + c = 0$$ and they are: 
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$

This is a geometric series:
\(\begin{equation} S = \sum_{n=0}^{\infty} ar^n = \frac{a}{1 - r} \label{eq:series} \end{equation}\)
We can reference the equation as \eqref{eq:series}.

1
2
3
4
5
6
7
8
This is a geometric series:   
$$
\begin{equation}
  S = \sum_{n=0}^{\infty} ar^n = \frac{a}{1 - r}
  \label{eq:series}
\end{equation}
$$   
We can reference the equation as \eqref{eq:series}.
  1. For markdown, LaTex inline equation: \(E = m \times c^2\)
  2. For HTML rendering inline equation: \( E = mc^2 \)
  3. \(E = mc^2\)
1
2
3
1. For markdown, LaTex inline equation: $$E = m \times c^2$$
2. For HTML rendering inline equation: \\( E = mc^2 \\)
3. \$$E = mc^2$$

Mermaid SVG

 gantt
  title Adding GANTT diagram functionality to mermaid
  apple :a, 2017-07-20, 1w
  banana :crit, b, 2017-07-23, 1d
  cherry :active, c, after b a, 1d
1
2
3
4
5
6
7
```mermaid
 gantt
  title Adding GANTT diagram functionality to mermaid
  apple :a, 2017-07-20, 1w
  banana :crit, b, 2017-07-23, 1d
  cherry :active, c, after b a, 1d
```

Images

Sherlock_MindPalace Sherlock - MindPalace

Sherlock_MindPalace

1
2
3
4
5
6
7
8
![Sherlock_MindPalace](assets/favicons/web-app-manifest-512x512.png){: .shadow }
_Sherlock - MindPalace_   

![Sherlock_MindPalace](assets/favicons/web-app-manifest-512x512.png){: w="200" h="200" }{: .normal }

<!-- ![Sherlock_MindPalace](assets/favicons/web-app-manifest-512x512.png){: width="700" height="400" }
![Sherlock_MindPalace](assets/favicons/web-app-manifest-512x512.png){: .left }
![Sherlock_MindPalace](assets/favicons/web-app-manifest-512x512.png){: .right } -->

Video

Video File

Vicky - Hiphop - Don't Stop (Cover)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{% 
  include embed/video.html 
  src='/assets/vid/Vicky - Hiphop - Dont Stop copy.mp4' 
  poster='/assets/vid/Vicky - Hiphop - Dont Stop-Cover copy.jpg' 
  title= "Vicky - Hiphop - Don't Stop (Cover)" 
%}

You can also specify additional attributes for the embedded video file. Here is a full list of attributes allowed:   
{%
  include embed/video.html
  src='/path/to/video.mp4'
  types='ogg|mov'
  poster='poster.png'
  title='Demo video'
  autoplay=true
  loop=true
  muted=true
%} 
  • types — specify the extensions of additional video formats separated by |. Ensure these files exist in the same directory
  • poster='/path/to/poster.png' — poster image for a video that is shown while video is downloading
  • title='Text' — title for a video that appears below the video and looks same as for images
  • autoplay=true — video automatically begins to play back as soon as it can
  • loop=true — automatically seek back to the start upon reaching the end of the video
  • muted=true — audio will be initially silenced

Social Media Platform

1
2
3
4
5
6
7
8
{% include embed/youtube.html id='PsP2vsy_8ms' %}

| Video URL      | Platform   | ID             |
| -------------- | ---------- | :------------- |
| [https://www.**youtube**.com/watch?v=**PsP2vsy_8ms**](https://www.youtube.com/watch?v=PsP2vsy_8ms)    | `youtube`        | `PsP2vsy_8ms`  |
| [https://www.**twitch**.tv/videos/**1634779211**](https://www.twitch.tv/videos/1634779211)            | `twitch`         | `1634779211`   |

Footnotes

1
2
3
4
5
6
7
Click the hook will locate the footnote[^footnote], 
and here is another footnote[^fn-2nd].

{content}

[^footnote]: The footnote source
[^fn-2nd]: The 2nd footnote source

Post’s Footnotes


  1. Check footnote1 Writing a New Post post ↩︎

  2. Check footnote2 Text and Typography post ↩︎

This post is licensed under CC BY 4.0 by the author.