Skip to content

Commit

Permalink
docs(cn): support global md config for attributes of external links (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed May 8, 2018
1 parent 20e5bd8 commit f31953d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Outbound links automatically gets `target="_blank" rel="noopener noreferrer"`:
- [vuejs.org](https://vuejs.org)
- [VuePress on GitHub](https://github.com/vuejs/vuepress)

You can customize the attributes added to external links by setting `config.markdown.externalLinks`. See more [here](/config/#markdown-externalLinks).
You can customize the attributes added to external links by setting [config.markdown.externalLinks](../config/#markdown-externallinks).

## Front Matter

Expand Down
7 changes: 7 additions & 0 deletions docs/zh/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ module.exports = {

[markdown-it-anchor](https://github.com/valeriangalliat/markdown-it-anchor) 的选项。

### markdown.externalLinks

- Type: `Object`
- Default: `{ target: '_blank', rel: 'noopener noreferrer' }`

这个键值对将会作为特性被增加到是外部链接的 `<a>` 标签上,默认的选项将会在新窗口中打开一个该外部链接。

### markdown.toc

- 类型: `Object`
Expand Down
4 changes: 3 additions & 1 deletion docs/zh/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@

### 外部链接

外部的链接将会被自动地设置为 `target="_blank"`:
外部的链接将会被自动地设置为 `target="_blank" rel="noopener noreferrer"`:

- [vuejs.org](https://vuejs.org)
- [VuePress on GitHub](https://github.com/vuejs/vuepress)

你可以自定义通过配置 [config.markdown.externalLinks](../config/#markdown-externallinks) 来自定义外部链接的特性。

## Front Matter

VuePress 提供了对 [YAML front matter](https://jekyllrb.com/docs/frontmatter/) 开箱即用的支持:
Expand Down

0 comments on commit f31953d

Please sign in to comment.