MDX 语法允许在 Markdown 中使用 JSX,可导入组件(如交互式图表或提示框),实现富文本与组件的结合。支持代码块、列表、脚注等多种元素,并可通过自定义标签扩展功能。
明月几时有?把酒问青天。不知天上宫阙,今夕是何年。我欲乘风归去,又恐琼楼玉宇,高处不胜寒。起舞弄清影,何似在人间。
转朱阁,低绮户,照无眠。不应有恨,何事长向别时圆?人有悲欢离合,月有阴晴圆缺,此事古难全。但愿人长久,千里共婵娟。
JSX in your markdown content. You can import components, such as interactive charts or alerts, and embed them within your content. This makes writing long-form content with components a blast. 🚀Here's a simple footnote,1 and here's a longer one.2
| Command | Description |
|---|---|
git status | List all new or modified files |
git diff | Show file differences that haven't been staged |
function Counter() {
const [count, setCount] = useState(0);
return (
<>
<p>{count}</p>
<button onClick={() => setCount(count + 1)}>+1</button>
</>
);
}
pnpm devNote
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.