607 字
3 分鐘
Fuwari 語法總集
2026-02-02

檔案結構#

貼文 metadata#

title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg # Optional
tags: [Foo, Bar]
category: Front-end
draft: false

圖片#

src/content/posts/
├── post-1.md
└── post-2/
├── cover.png
└── index.md

Markdown Extended#

GitHub Card#

::github{repo="minstrike520/blog-fuwari"}
minstrike520
/
blog-fuwari
Waiting for api.github.com...
00K
0K
0K
Waiting...

GitHub-styled Callouts#

NOTE


Highlights information that users should take into account, even when skimming.

TIP

Optional information to help a user be more successful.

WARNING


Crucial information necessary for users to succeed.

WARNING


Critical content demanding immediate user attention due to potential risks.

Negative potential consequences of an action.

程式語法#

Expressive Code

隱藏字元#

:spoiler[你知道的太多了]

隱藏字元在此:「你知道的太多了

跳脫字元#

Terminal window
Standard ANSI colors:
- Dimmed: Black Red Green Yellow Blue Magenta Cyan White
- Foreground: Black Red Green Yellow Blue Magenta Cyan White
- Background: Black Red Green Yellow Blue Magenta Cyan White
- Reversed: Black Red Green Yellow Blue Magenta Cyan White
8-bit colors (showing colors 160-171 as an example):
- Dimmed: 160 161 162 163 164 165 166 167 168 169 170 171
- Foreground: 160 161 162 163 164 165 166 167 168 169 170 171
- Background: 160 161 162 163 164 165 166 167 168 169 170 171
- Reversed: 160 161 162 163 164 165 166 167 168 169 170 171
24-bit colors (full RGB):
- Dimmed: ForestGreen - RGB(34,139,34) RebeccaPurple - RGB(102,51,153)
- Foreground: ForestGreen - RGB(34,139,34) RebeccaPurple - RGB(102,51,153)
- Background: ForestGreen - RGB(34,139,34) RebeccaPurple - RGB(102,51,153)
- Reversed: ForestGreen - RGB(34,139,34) RebeccaPurple - RGB(102,51,153)
Font styles:
- Default
- Bold
- Dimmed
- Italic
- Underline
- Reversed
- Strikethrough

如果直接複製命令行程式輸出,並不會複製到它附帶的 ANSI 資訊。我們可以利用許多程式支援的 --color=always 旗標加上 Bash 的重新導向語法(如 | nvim> output.ansi)來獲得。

bat -p test.py --color=always > test.py.ansi; cat test.py.ansi
# === COLOR_PRINT
COLOR_PRINT_DBG=True
def print_err(*args, **kwargs): print('\033[31m[Error] \033[0m', end=''); print(*args, **kwargs)
def print_info(*args, **kwargs): print('\033[32m[Info] \033[0m', end=''); print(*args, **kwargs)
def print_warn(*args, **kwargs): print('\033[33m[Warn] \033[0m', end=''); print(*args, **kwargs)
def print_dbg(*args, **kwargs):
if not COLOR_PRINT_DBG: return
print('\033[34m[DEBUG] \033[0m', end=''); print(*args, **kwargs)
# /=== COLOR_PRINT
print_dbg('test')

標注#

```js {1, 4, 7-8}
// Line 1 - targeted by line number
// Line 2
// Line 3
// Line 4 - targeted by line number
// Line 5
// Line 6
// Line 7 - targeted by range "7-8"
// Line 8 - targeted by range "7-8"
```
// Line 1 - targeted by line number
// Line 2
// Line 3
// Line 4 - targeted by line number
// Line 5
// Line 6
// Line 7 - targeted by range "7-8"
// Line 8 - targeted by range "7-8"

關閉行號#

#include <stdio.h>
int main() {
printf("this is awesome!");
return 0;
}

檔名#

test.c
#include <test.h>
int impl_test() {
return 0;
}
Fuwari 語法總集
https://blade520.com/posts/fuwari-syntax/
作者
Blade/磯江
發佈於
2026-02-02
許可協議
CC BY-NC-SA 4.0