315 字
2 分钟
Markdown Extended Features

GitHub Repository Cards#

You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.

Fabrizz
/
MMM-OnSpotify
Waiting for api.github.com...
00K
0K
0K
Waiting...

Create a GitHub repository card with the code ::github{repo="<owner>/<repo>"}.

::github{repo="saicaca/fuwari"}

图片尺寸指令 ::img#

通过 ::img 指令可以指定文章内图片的显示尺寸;不使用时,图片使用默认样式(由主题 prose 与 .custom-md img 控制)。

语法:::img{src="图片路径" alt="描述" size="S|M|L"},其中 size 可选:

  • S(小):最大宽度约 40%
  • M(中):最大宽度约 65%
  • L(大):最大宽度 100%

也可写为 small / medium / largealt 可选。

示例(将路径替换为你自己的图片):

::img{src="/images/example.jpg" alt="示例" size="S"}
::img{src="/images/example.jpg" size="M"}
::img{src="/images/example.jpg" alt="大图" size="L"}

普通 Markdown 图片 ![alt](url) 不受影响,仍使用默认样式。

Admonitions#

Following types of admonitions are supported: note tip important warning caution

NOTE

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

TIP

Optional information to help a user be more successful.

IMPORTANT

Crucial information necessary for users to succeed.

WARNING

Critical content demanding immediate user attention due to potential risks.

CAUTION

Negative potential consequences of an action.

Basic Syntax#

:::note
Highlights information that users should take into account, even when skimming.
:::
:::tip
Optional information to help a user be more successful.
:::

Custom Titles#

The title of the admonition can be customized.

MY CUSTOM TITLE

This is a note with a custom title.

:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::

GitHub Syntax#

TIP

The GitHub syntax is also supported.

> [!NOTE]
> The GitHub syntax is also supported.
> [!TIP]
> The GitHub syntax is also supported.

Spoiler#

You can add spoilers to your text. The text also supports Markdown syntax.

The content is hidden ayyy!

The content :spoiler[is hidden **ayyy**]!
Markdown Extended Features
https://fuwari.vercel.app/posts/markdown-extended/
作者
发布于
2024-05-01
许可协议
CC BY-NC-SA 4.0