docsify-admonition-plugin
v1.0.2
Published
docsify-admonition plugin for docsify
Downloads
18
Readme
docsify-admonition
docsify-admonition is a plugin for docsify.
Introduction
The docsify-admonition plugin is inspired by docsify-plugin-flexible-alerts and mkdocs-material.
Usage
First, inlcude below essential files:
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="http://unpkg.com/docsify-admonition-plugin/build/admonition.css" />
<script src="http://unpkg.com/docsify-admonition-plugin/build/index.js"></script>
You can use it locally if you want, these files are all in
build
dir.
Then you can use below syntax:
> [!note][Header]
Note Content
>
> [!hint][Header]
Hint Content
>
> [!caution][Header]
Caution Content
>
> [!danger][Header]
Danger Content
>
> [!error][Header]
Error Content
>
> [!Attention][Header]
Attention Content
>
Configuration
As you can see, The default configuration will show labels like note, hint
. To hidden these labels, you need to do this:
window.$docsify = {
// ...
admonition: {
labelVisibility: 'hidden'
}
//, ...
}
After doing that, you'll see:
Attention
You can use ]
in header, since we use ]
to check the end of header! If you want to use ]
in header you can use ]
instead of ]
.
License
MIT.