How to write a new post
a simple demonstration to supported formats in a post
Headings
H1 — heading
H2 — heading
H3 — heading
H4 — heading
Four kinds of prompts
An example showing the
tiptype prompt.
An example showing the
infotype prompt.
An example showing the
warningtype prompt.
An example showing the
dangertype prompt.
Code blocks
Inline code
This is an example of Inline Code.
Common
1
This is a common code snippet, without syntax highlight and line number.
Specific Language
1
2
3
4
if [ $? -ne 0 ]; then
echo "The command was not successful.";
#exit
fi;
Specific filename
1
@import 'addon/commons';
Jekyll Liquid Codes
1
2
3
{% if product.title contains 'Pack' %}
This product's title contains the word Pack.
{% endif %}
code blocks without line number
1
cout<<"hello world"<<endl;
Video
Bilibili
Youtube(a VPN is required to load it successfully)
Audio
audio demo
Image
Image with specific width and height
Left aligned image
text below
Float to left
ramdom text for showing the effect of float: Praesent maximus aliquam sapien. Sed vel neque in dolor pulvinar auctor. Maecenas pharetra, sem sit amet interdum posuere, tellus lacus eleifend magna, ac lobortis felis ipsum id sapien. Proin ornare rutrum metus, ac convallis diam volutpat sit amet. Phasellus volutpat, elit sit amet tincidunt mollis, felis mi scelerisque mauris, ut facilisis leo magna accumsan sapien. In rutrum vehicula nisl eget tempor. Nullam maximus ullamcorper libero non maximus. Integer ultricies velit id convallis varius. Praesent eu nisl eu urna finibus ultrices id nec ex. Mauris ac mattis quam. Fusce aliquam est nec sapien bibendum, vitae malesuada ligula condimentum.
Dark/Light mode & Shadow
The image below will toggle dark/light mode based on theme preference, notice it has shadows.
Math powered by MathJax
inline math
both $LaTeX-math-expression$ and \(LaTeX-math-expression\)” are fine.
- \(LaTeX-math-expression\)
- \(LaTeX-math-expression\)
centered matrix and left aligned matrix
\[\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix} \cdot \begin{pmatrix} 9 & 8 & 7 \\ 6 & 5 & 4 \\ 3 & 2 & 1 \end{pmatrix} = \begin{pmatrix} 30 & 24 & 18 \\ 84 & 69 & 54 \\ 138 & 114 & 90 \end{pmatrix}\]\(\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}\)
\(\begin{Bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{Bmatrix}\)
equation
\[\begin{equation} \sum_{n=1}^\infty 1/n^2 = \frac{\pi^2}{6} \label{eq:series1} \end{equation}\] \[\begin{equation} \lim_{x \to 0} \frac{x}{\sin x}=1 \label{eq:series2} \end{equation}\]We can reference the equation as \eqref{eq:series1}. We can reference the equation as \eqref{eq:series2}.
\[\begin{cases} x + y = 5 \\ x - y = 1 \end{cases}\]\(f(x)=\begin{cases} x \quad (x>0) \\ 0 \quad (x<=0) \end{cases}\)
\(f(x)=\begin{cases} x \ (x>0) \\ 0 \ (x<=0) \end{cases}\)
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}\]Graphs supported by Mermaid
gantt
title GANTT diagram of mermaid
sleep :a, 2024-06-20, 8h
sleep more :crit, b, after a, 12h
sleep much more :active, c, after b a, 1d
xychart-beta
title "Sales Revenue"
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
sequenceDiagram
participant 客户
participant 服务器
客户->>服务器: 发送请求
服务器-->>客户: 返回响应
客户->>服务器: 请求数据
服务器-->>客户: 发送数据
Lists
Ordered list
- Firstly
- Secondly
- Thirdly
Unordered list
- Chapter
- Page
- Paragraph
- Page
ToDo list
- Job
- Step 1
Description list
- Sun
- the star around which the earth orbits
Quote and bold and italic
This line shows the block quote and block quote.
Filepath
Here is the /path/to/the/file.extend.
Links
Tables
| Company | Contact | Country |
|---|---|---|
| Alfreds Futterkiste | Maria Anders | Germany |
| Island Trading | Helen Bennett | UK |
Footnote
Click the hook will locate the footnote1, and here is another footnote2.
other formats
Any other format supported by markdown is also supported.
