diff --git a/docs/configuration.md b/docs/configuration.md index 4b05476e6..26e3f0df8 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -111,7 +111,7 @@ Add TOC in custom sidebar. ```js window.$docsify = { - subMaxLevel: 3 + subMaxLevel: 2 } ``` @@ -219,6 +219,17 @@ See [Markdown configuration](/markdown). ```js window.$docsify = { + // object + markdown: { + smartypants: true, + renderer: { + link: function() { + // ... + } + } + }, + + // function markdown: function (marked, renderer) { // ... return marked diff --git a/docs/markdown.md b/docs/markdown.md index d38436571..a45f188b0 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -1,12 +1,16 @@ # Markdown configuration -The Markdown parser is [marked](https://github.com/chjj/marked). You can customize how docsify renders your Markdown content to HTML. +The Markdown parser is [marked](https://github.com/chjj/marked). You can customize how docsify renders your Markdown content to HTML. Support customize `renderer`. ```js window.$docsify = { markdown: { - smartypants: true - // ... + smartypants: true, + renderer: { + link: function() { + // ... + } + } } } ``` diff --git a/docs/zh-cn/configuration.md b/docs/zh-cn/configuration.md index 685de3c1c..28c0af9b3 100644 --- a/docs/zh-cn/configuration.md +++ b/docs/zh-cn/configuration.md @@ -113,7 +113,7 @@ window.$docsify = { ```js window.$docsify = { - subMaxLevel: 3 + subMaxLevel: 2 } ``` @@ -212,12 +212,23 @@ window.$docsify = { ## markdown -- 类型: `Function` +- 类型: `Object|Function` 参考 [Markdown 配置](/zh-cn/markdown)。 ```js window.$docsify = { + // object + markdown: { + smartypants: true, + renderer: { + link: function() { + // ... + } + } + }, + + // function markdown: function (marked, renderer) { // ... return marked diff --git a/docs/zh-cn/markdown.md b/docs/zh-cn/markdown.md index d134e1f10..a0028399d 100644 --- a/docs/zh-cn/markdown.md +++ b/docs/zh-cn/markdown.md @@ -1,12 +1,16 @@ # Markdown 配置 -内置的 Markdown 解析器是 [marked](https://github.com/chjj/marked),可以修改它的配置。 +内置的 Markdown 解析器是 [marked](https://github.com/chjj/marked),可以修改它的配置。同时可以直接配置 `renderer`。 ```js window.$docsify = { markdown: { - smartypants: true - // ... + smartypants: true, + renderer: { + link: function() { + // ... + } + } } } ``` diff --git a/docs/zh-cn/quickstart.md b/docs/zh-cn/quickstart.md index 8ae891f2f..c4ebc2821 100644 --- a/docs/zh-cn/quickstart.md +++ b/docs/zh-cn/quickstart.md @@ -1,3 +1,4 @@ +# 快速开始 推荐安装 `docsify-cli` 工具,可以方便创建及本地预览文档网站。