Skip to content
    在 Opshell 的 Blog 中:
  • 目前已分享 70 篇文章
  • 還有 114 個坑正在填補中
  • 已有: Loading 次觀看
  • 已有: Loading 個人來過
✍️ Opshell
📆 Last Updated:8/26/2024
👀 已被閱讀: Loading
🏷️ murmur

Markdown Extension Examples

This page demonstrates some of the built-in markdown extensions provided by VitePress.

Syntax Highlighting

VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:

Input

md
```js{4}
export default {
  data () {
    return {
      msg: 'Highlighted!'
    }
  }
}
```

Output

js
export default {
  data () {
    return {
      msg: 'Highlighted!'
    }
  }
}

Custom Containers

Input

md
::: info
This is an info box.
:::

::: tip
This is a tip.
:::

::: warning
This is a warning.
:::

::: danger
This is a dangerous warning.
:::

::: details
This is a details block.
:::

Output

細節:

This is an info box.

💡 錦囊 [Tips]:

This is a tip.

⚡ 注意 [Warning]:

This is a warning.

⛔ 錯誤 [Error]:

This is a dangerous warning.

詳細資料 [Details]:

This is a details block.

More

Check out the documentation for the full list of markdown extensions.

Last Updated at:

Released under the MIT License.