MDX Syntax - Basic

Apr 27, 2023· 2 min read

明月几时有?把酒问青天。不知天上宫阙,今夕是何年。我欲乘风归去,又恐琼楼玉宇,高处不胜寒。起舞弄清影,何似在人间。

转朱阁,低绮户,照无眠。不应有恨,何事长向别时圆?人有悲欢离合,月有阴晴圆缺,此事古难全。但愿人长久,千里共婵娟。


Heading2

Heading3

Heading4

Heading5
Heading6

MDX allows you to use 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. 🚀

MDX MDX MDX MDX MDX MDX

https://mdxjs.com/

Here's a simple footnote,1 and here's a longer one.2

CommandDescription
git statusList all new or modified files
git diffShow file differences that haven't been staged
JSX
function Counter() { const [count, setCount] = useState(0); return ( <> <p>{count}</p> <button onClick={() => setCount(count + 1)}>+1</button> </> ); }
  • First item
  • Second item
  • Third item
  1. First item
  2. Second item
  3. Third item
  • First item
  • Second item
  • Third item

tip

danger

warning

Footnotes

  1. This is the first footnote.

  2. Here's one with multiple paragraphs and code.

    Indent paragraphs to include them in the footnote.

    { my code }

    Add as many paragraphs as you like.