markdown-hint
Add gfm alerts and hint containers to your VuePress site.
This plugin has been integrated into the default theme.
Usage
npm i -D @vuepress/plugin-markdown-hint@nextimport { markdownHintPlugin } from '@vuepress/plugin-markdown-hint'
export default {
plugins: [
markdownHintPlugin({
// Enable hint container, true by default
hint: true,
// Enable gfm alert
alert: true,
}),
],
}Guide
By default, we support important, info, note, tip, warning, caution, details containers with markdown container:
::: tip
A custom tip container with `code` and [links](https://example.com).
```js
const a = 1
```
:::To customize the title of the container, you can add the title after the named container:
Custom Title
An important container with customized title.
::: important Custom Title
An important container with customized title.
:::The container can contain a title only:
Title only
::: warning Title only
:::The plugin also provides an alert option to support gfm alerts:
> [!note]
> This is note text
> [!important]
> This is important text
> [!tip]
> This is tip text
> [!warning]
> This is warning text
> [!caution]
> This is caution textOptions
booleantrueWhether to enable hint containers including important, info, note, tip, warning, caution, details.
booleanWhether to enable GFM alert support.
booleantrueWhether to inject default styles.
MarkdownHintPluginLocaleConfigLocale config for hint container titles.
See also: Locales.
stringDefault title text for important block.
stringDefault title text for note block.
stringDefault title text for tip block.
stringDefault title text for warning block.
stringDefault title text for caution block.
stringDefault title text for info block.
stringDefault title text for details block.
