Markdown Cheatsheet

This page also used for testing components used in the posts and pages.

My blogโ€™s information

Design

Frequently used Emoji

:D(shortcut)
๐Ÿ˜„ :smile:๐Ÿ˜Š :blush:๐Ÿ˜ :heart_eyes:
๐Ÿ˜“ :sweat::thumbsup: :thumbsup:๐Ÿ˜‹ :yum:
๐Ÿ˜ฐ :cold_sweat:๐Ÿ˜ฑ :scream:๐Ÿ˜ญ :sob:
๐Ÿ˜œ :stuck_out_tongue_winking_eye:๐Ÿ˜— :kissing:๐Ÿ˜ช :sleepy:
๐Ÿ’ฉ :poop:โœŒ :v:๐Ÿ’ฏ :100:
๐Ÿ™ˆ :see_no_evil:๐Ÿ™‰ :hear_no_evil:๐Ÿ™Š :speak_no_evil:
๐Ÿ’‹ :kiss:๐Ÿ’€ :skull:๐Ÿ’ง :droplet:
๐ŸŽ† :fireworks:๐Ÿ“ข :loudspeaker:โš ๏ธ :warning:
๐Ÿšซ :no_entry_sign:โœ… :white_check_mark:โŒ :x:
ใŠ™๏ธ :secret:โ‰๏ธ :interrobang:โ€ผ๏ธ :bangbang:
and more from Emoji Cheatsheet

CSS

Keyboard (kbd)

  • {{ kbd Control }} โ†’ Control
  • {{ kbd Shift โ‡ง }} โ†’ Shift โ‡ง - use Unicode characters
  • {{ kbd Command }} โ†’ CommandโŒ˜ (expands to โŒ˜)
  • {{ kbd Option }} โ†’ OptionโŒฅ (expands to โŒฅ)
  • {{ kbd enter }} โ†’ enterโ†ต (enter is followed by the โ†ต symbol)
  • {{ kbd style="font-weight bold" Ctrl }} โ†’ Ctrl (inline style attribute; see note below)
  • Note: the style="..." value must not contain colons (:) โ€” they collide with remark-directive label syntax. Use simple space-separated declarations like font-weight bold.

Keyboard alignment spacers

When laying out keys in fixed-width columns, use these spacers to align cells:

  • {{ box }} โ†’ โ€” empty cell of standard keymap width
  • {{ mbox }} โ†’ โ€” narrow mid-cell gap
  • {{ left-space }} โ†’ โ€” left side spacer
  • {{ mid }} โ†’ โ€” center gap

These are most useful inside a :::keymap container (see below).

Keyboard Maps

The :::keymap directive renders its body with each newline becoming its own row. Combine {{ kbd }} with the spacers above to build keyboard-layout diagrams.

Code:

:::keymap
{{ kbd Esc }} {{ kbd F1 }} {{ kbd F2 }} {{ kbd F3 }} {{ kbd F4 }}
{{ kbd ~ }} {{ kbd 1 }} {{ kbd 2 }} {{ kbd 3 }} {{ kbd 4 }}
{{ kbd Tab }} {{ kbd Q }} {{ kbd W }} {{ kbd E }} {{ kbd R }}
:::

Result:

Esc F1 F2 F3 F4

~ 1 2 3 4

Tab Q W E R

With a centered cluster using spacers:

Code:

:::keymap
{{ kbd Ctrl }} {{ kbd Alt }} {{ left-space }} {{ kbd Space }} {{ mid }} {{ kbd Space }} {{ left-space }} {{ kbd Alt }} {{ kbd F4 }}
:::

Result:

Ctrl Alt Space Space Alt F4

Markdown (with plugins)

  • ++Inserted++ Inserted
  • Footnote [^1] for the mark1, [^1]: for the note
  • Native markdown escaping: wrap literal {{ }}, {%%}, or ::: in backticks (e.g., `{{ kbd }}`) or in a code fence. There is no {% raw %} plugin โ€” it only appears to work because unknown {% ... %} tags are ignored by the parser.
  • {% youtube [youtube id] %} is documented here for historical reference only. No plugin implements it โ€” the tag is rendered as literal text. If you see this in older posts, treat it as a no-op.
ActionMarkdownSample
subH~2~0H20
supx^2^x^2^
Bold**bold**bold
Italic*italic*italic
Bold and Italic***bold and italic***bold and italic
Marked==marked====marked==
Strikethrough~~strikethrough~~strikethrough
Inline code`inline code`inline code
Link[link text](https://neo01.com)link text
Image![alt text](http://localhost:8000/assets/neo16-1002.png)alt text
Image with class![alt](http://localhost:8000/assets/neo16-1002.png){.cert-thumb}n/a (table cells not parsed as paragraphs โ€” see demo below)
Attributes with style class, eg:
# header {.style-me}
paragraph {data-toggle=modal}
paragraph *style me*{.red} more text

output

<h1 class="style-me">header</h1>
<p data-toggle="modal">paragraph</p>
<p>paragraph <em class="red">style me</em> more text</p>

Image with class

Append {.className} (or {: .className}) to the line after an image to apply a class. The shorthand only works inside a paragraph โ€” not inside table cells.

Code:

![cert](http://localhost:8000/assets/neo16-1002.png){.cert-thumb}

Result:

cert

Table Column Alignment

Code:

| --- | :-- | :-: | --: |
| 1 | 1 | 1 | 1 |
| 22 | 22 | 22 | 22 |
| 333 | 333 | 333 | 333 |

Result:

DefaultLeftCenterRight
1111
22222222
333333333333

Blockquote

Code:

> Some quote text

Result:

Some quote text

Ordered list

Code:

1. item 1
2. item 2

Result:

  1. item 1
  2. item 2

Unordered list

Code:

- item 1
- item 2

Result:

  • item 1
  • item 2

Horizontal rule

Code:

---

Result:


Code Fences (Shiki)

Generic fenced code is highlighted by Shiki with the github-dark theme.

Add the showLineNumbers meta to render line numbers:

Code:

```js showLineNumbers
function greet(name) {
  return `Hello, ${name}!`;
}
```

Result:

function greet(name) {
  return `Hello, ${name}!`;
}

GitHub Card

User

Code:

:::githubCard{user="neoalienson"}
:::

Result:

neoalienson's avatar

neoalienson

@neoalienson

๐Ÿ“ --
Repositories
โญ --
Stars
๐Ÿ“ˆ --
Commits
๐Ÿ‘ฅ --
Followers
๐Ÿ”„ --
Pull Requests
โ— --
Issues

A repository

Code:

:::githubCard{user="neoalienson" repo="pachinko"}
:::

Result:

๐Ÿ“–

neoalienson/pachinko

Loading repository data...

โญ -- ๐Ÿด -- Language: --

Mermaid JS

block-beta columns 1 db(("DB")) blockArrowId6<["&nbsp;&nbsp;&nbsp;"]>(down) block:ID A B["A wide one in the middle"] C end space D ID --> D C --> D style B fill:#969,stroke:#333,stroke-width:4px

Echarts

Simple bar chart:

{ "id": "echarts-bar-demo", "name": "Ephemeral Port Ranges by OS", "aria": { "enabled": true, "decal": { "show": true } }, "colorBy": "data", "title": { "text": "Ephemeral Port Ranges by OS" }, "tooltip": { "axisPointer": { "type": "shadow" } }, "xAxis": { "type": "category", "data": ["Linux", "Windows", "macOS", "FreeBSD"] }, "yAxis": { "type": "value", "name": "Ports" }, "series": [{ "name": "Ports", "type": "bar", "data": [28233, 16384, 16384, 55536], "emphasis": { "focus": "series" } }] }

Line chart:

{ "id": "echarts-line-demo", "name": "API Calls Over Time", "aria": { "enabled": true }, "title": { "text": "API Calls Over Time" }, "tooltip": { "trigger": "axis" }, "xAxis": { "type": "category", "data": ["Mon", "Tue", "Wed", "Thu", "Fri"] }, "yAxis": { "type": "value" }, "series": [{ "name": "API Calls", "type": "line", "data": [320, 532, 401, 634, 590], "smooth": true, "symbol": "circle", "symbolSize": 8, "areaStyle": {}, "emphasis": { "focus": "series" }, "label": { "show": true } }] }

Admonition Blocks

๐Ÿ’กSee the Admonition Reference

The full catalog of admonition types, collapsible variants, directive label syntax, advanced formatting examples, and LaTeX inside admonitions lives on its own page. See the Admonition Reference for the complete reference.

LaTeX (KaTeX)

Inline math with single dollar signs: renders alongside prose.

Block math with double dollar signs:

Common snippets

Code:

Inline: $a^2 + b^2 = c^2$

Block:

$$
f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n
$$

Result:

Inline:

Block:

Matrices and cases

Code:

$$
A = \begin{pmatrix}
a & b \\
c & d
\end{pmatrix}
$$

$$
f(n) = \begin{cases}
n/2 & \text{if } n \text{ is even} \\
3n+1 & \text{if } n \text{ is odd}
\end{cases}
$$

Result:

Footnotes

  1. Footnote sample โ†ฉ