跳到主要内容

Markdown语法

· 阅读需 1 分钟
Lichlaughing

Docusaurus 一些语法,例如:Tab

Tabs

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="apple" label="Apple" default>
This is an apple 🍎
</TabItem>
<TabItem value="orange" label="Orange">
This is an orange 🍊
</TabItem>
<TabItem value="banana" label="Banana">
This is a banana 🍌
</TabItem>
</Tabs>

This is an apple 🍎

Tips

:::note

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::

:::tip

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::

:::info

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::

:::caution

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::

:::danger

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::
备注

Some content with Markdown syntax. Check this api.

提示

Some content with Markdown syntax. Check this api.

信息

Some content with Markdown syntax. Check this api.

警告

Some content with Markdown syntax. Check this api.

危险

Some content with Markdown syntax. Check this api.

代码行高亮

// highlight-start
代码
// highlight-end
function HighlightSomeText(highlight) {
if (highlight) {
return '这行被高亮了!';
}

return '这里不会';
}

function HighlightMoreText(highlight) {
if (highlight) {
return '这块被高亮了!';
}

return '这里不会';
}