From 510ae37a04d0f21075629d0fa12c07d6840a1092 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 10 Jan 2017 23:32:25 +0800 Subject: [PATCH] Add doc --- CHANGELOG.md | 2 +- docs/README.md | 20 ++++++++++++++++++++ docs/zh-cn.md | 18 ++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb68fdec..86321d31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## 1.6.0 ### Features - Improve sidebar performance. The active item is automatically scrolled in the visible view. -- New markdown grammar: `! `. e.g. `! content` will be rendered as `

content

` +- New doc helper: `! `. e.g. `! content` will be rendered as `

content

` ## 1.5.2 ### Bug fixes diff --git a/docs/README.md b/docs/README.md index 71c8ac3c..d36bae51 100644 --- a/docs/README.md +++ b/docs/README.md @@ -157,6 +157,26 @@ window.$docsify = { } ``` +### Doc Helpers +#### p.tip + +'! ' add your content will rendered as `

content

` + +```markdown +! Important **information** +``` + +It will be rendered + +```html +

Important information

+``` + +e.g. + +! Important **information** + + ## Options You can add configurations in the script tag attributes or with `window.$docsify`. diff --git a/docs/zh-cn.md b/docs/zh-cn.md index 081b4db4..f714c93e 100644 --- a/docs/zh-cn.md +++ b/docs/zh-cn.md @@ -163,6 +163,24 @@ window.$docsify = { } ``` +### 文档助手 +#### 内置「提示」语法 + +感叹号加空格,后面接内容,会渲染成带 tip 类名的段落。 + +```markdown +! 提示信息,**支持其他 markdown 语法** +``` + +将被渲染成 + +```html +

提示信息支持其他 markdown 语法

+``` + +效果 + +! 适合显示醒目的内容 ## 配置参数