Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #23

Merged
merged 1 commit into from Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion cdn.md
Expand Up @@ -52,7 +52,8 @@ CSS 的压缩文件位于 `/lib/themes/` 目录下,JS 的压缩文件是原有

## 其他 CDN

- http://www.bootcdn.cn/docsify (支持国内)
- https://www.bootcdn.cn/docsify/ (支持国内)
- https://cdn.jsdelivr.net/npm/docsify/ (国内外都支持)
- https://cdnjs.com/libraries/docsify
- https://unpkg.com/browse/docsify/

9 changes: 9 additions & 0 deletions helpers.md
Expand Up @@ -59,6 +59,14 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。
[link](/demo ':disabled')
```

## 跨域链接

只有当你同时设置了 `routerMode: 'history'` 和 `externalLinkTarget: '_self'` 时,你需要为这些跨域链接添加这个配置。

```md
[example.com](https://example.com/ ':crossorgin')
```

## Github 任务列表

```md
Expand Down Expand Up @@ -100,6 +108,7 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。
```md
![logo](https://docsify.js.org/_media/icon.svg ':class=someCssClass')
```

### 设置图片的 ID

```md
Expand Down
12 changes: 6 additions & 6 deletions more-pages.md
Expand Up @@ -101,24 +101,24 @@ docs/zh-cn/guide.md => http://domain.com/zh-cn/guide

## 忽略副标题

当设置了 `subMaxLevel` 时,默认情况下每个标题都会自动添加到目录中。如果你想忽略特定的标题,可以给它添加  `{docsify-ignore}` 。
当设置了 `subMaxLevel` 时,默认情况下每个标题都会自动添加到目录中。如果你想忽略特定的标题,可以给它添加 `<!-- {docsify-ignore} -->` 。

```markdown
# Getting Started

## Header {docsify-ignore}
## Header <!-- {docsify-ignore} -->

该标题不会出现在侧边栏的目录中。
```

要忽略特定页面上的所有标题,你可以在页面的第一个标题上使用 `{docsify-ignore-all}` 。
要忽略特定页面上的所有标题,你可以在页面的第一个标题上使用 `<!-- {docsify-ignore-all} -->` 。

```markdown
# 入门 {docsify-ignore-all}
# Getting Started <!-- {docsify-ignore-all} -->

## 标题
## Header

该标题不会出现在侧边栏的目录中。
```

在使用时, `{docsify-ignore}` 和 `{docsify-ignore-all}` 都不会在页面上呈现。
在使用时, `<!-- {docsify-ignore} -->` 和 `<!-- {docsify-ignore-all} -->` 都不会在页面上呈现。
17 changes: 17 additions & 0 deletions plugins.md
Expand Up @@ -38,6 +38,23 @@

// 搜索标题的最大层级, 1 - 6
depth: 2,

hideOtherSidebarContent: false, // 是否隐藏其他侧边栏内容

// 避免搜索索引冲突
// 同一域下的多个网站之间
namespace: 'website-1',

// 使用不同的索引作为路径前缀(namespaces)
// 注意:仅适用于 paths: 'auto' 模式
//
// 初始化索引时,我们从侧边栏查找第一个路径
// 如果它与列表中的前缀匹配,我们将切换到相应的索引
pathNamespaces: ['/zh-cn', '/ru-ru', '/ru-ru/v1'],

// 您可以提供一个正则表达式来匹配前缀。在这种情况下,
// 匹配到的字符串将被用来识别索引
pathNamespaces: /^(\/(zh-cn|ru-ru))?(\/(v1|v2))?/
}
}
</script>
Expand Down