mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-04-30 10:22:45 +08:00
docs: Update installation instructions for v2 of docsify-copy-code plugin (#465)
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
Als Standardeinstellung werden Hyperlinks auf der aktuellen Seite erkannt und der Inhalt in `localStorage` gespeichert. Du kannst den Pfad zu den Dateien auch anpassen:
|
Als Standardeinstellung werden Hyperlinks auf der aktuellen Seite erkannt und der Inhalt in `localStorage` gespeichert. Du kannst den Pfad zu den Dateien auch anpassen:
|
||||||
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script>
|
<script>
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
@@ -67,7 +66,6 @@ Konfiguration über `data-ga`:
|
|||||||
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
|
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## emoji
|
## emoji
|
||||||
|
|
||||||
Als Standardeinstellung werden emojis umgewandelt. Als Beispiel wird `:100:` umgewandelt in :100:. Aber das ist nicht genau, das es keine passende Nicht-emoji Zeichenfolge gibt. Solltest du emojis richtig umwandeln wollen, musst du diese Erweiterung verwenden.
|
Als Standardeinstellung werden emojis umgewandelt. Als Beispiel wird `:100:` umgewandelt in :100:. Aber das ist nicht genau, das es keine passende Nicht-emoji Zeichenfolge gibt. Solltest du emojis richtig umwandeln wollen, musst du diese Erweiterung verwenden.
|
||||||
@@ -106,7 +104,6 @@ When readers expand the demo box, the source code and description are shown ther
|
|||||||
|
|
||||||
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
|
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
|
||||||
|
|
||||||
|
|
||||||
## Edit on github
|
## Edit on github
|
||||||
|
|
||||||
Add `Edit on github` button on every pages. Provided by [@njleonzhang](https://github.com/njleonzhang), check [document](https://github.com/njleonzhang/docsify-edit-on-github)
|
Add `Edit on github` button on every pages. Provided by [@njleonzhang](https://github.com/njleonzhang), check [document](https://github.com/njleonzhang/docsify-edit-on-github)
|
||||||
@@ -116,22 +113,11 @@ Add `Edit on github` button on every pages. Provided by [@njleonzhang](https://g
|
|||||||
Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
|
Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="//unpkg.com/docsify-copy-code/styles.css">
|
<script src="//unpkg.com/docsify-copy-code"></script>
|
||||||
<script src="//unpkg.com/docsify-copy-code/index.js"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
window.$docsify = {
|
|
||||||
plugins: [
|
|
||||||
window.DocsifyCopyCodePlugin.init()
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
|
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Disqus
|
## Disqus
|
||||||
|
|
||||||
Disqus comments. https://disqus.com/
|
Disqus comments. https://disqus.com/
|
||||||
@@ -145,10 +131,9 @@ Disqus comments. https://disqus.com/
|
|||||||
<script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script>
|
<script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Gitalk
|
## Gitalk
|
||||||
|
|
||||||
[Gitalk](https://github.com/gitalk/gitalk) is a modern comment component based on Github Issue and Preact.
|
[Gitalk](https://github.com/gitalk/gitalk) is a modern comment component based on Github Issue and Preact.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
|
<link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
By default, the hyperlink on the current page is recognized and the content is saved in `localStorage`. You can also specify the path to the files.
|
By default, the hyperlink on the current page is recognized and the content is saved in `localStorage`. You can also specify the path to the files.
|
||||||
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script>
|
<script>
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
@@ -67,7 +66,6 @@ Configure by `data-ga`.
|
|||||||
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
|
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## emoji
|
## emoji
|
||||||
|
|
||||||
The default is to support parsing emoji. For example `:100:` will be parsed to :100:. But it is not precise because there is no matching non-emoji string. If you need to correctly parse the emoji string, you need install this plugin.
|
The default is to support parsing emoji. For example `:100:` will be parsed to :100:. But it is not precise because there is no matching non-emoji string. If you need to correctly parse the emoji string, you need install this plugin.
|
||||||
@@ -98,7 +96,6 @@ Exclude the special image
|
|||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Edit on github
|
## Edit on github
|
||||||
|
|
||||||
Add `Edit on github` button on every pages. Provided by [@njleonzhang](https://github.com/njleonzhang), check [document](https://github.com/njleonzhang/docsify-edit-on-github)
|
Add `Edit on github` button on every pages. Provided by [@njleonzhang](https://github.com/njleonzhang), check [document](https://github.com/njleonzhang/docsify-edit-on-github)
|
||||||
@@ -111,27 +108,16 @@ When readers expand the demo box, the source code and description are shown ther
|
|||||||
|
|
||||||
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
|
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
|
||||||
|
|
||||||
|
|
||||||
## Copy to Clipboard
|
## Copy to Clipboard
|
||||||
|
|
||||||
Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
|
Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="//unpkg.com/docsify-copy-code/styles.css">
|
<script src="//unpkg.com/docsify-copy-code"></script>
|
||||||
<script src="//unpkg.com/docsify-copy-code/index.js"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
window.$docsify = {
|
|
||||||
plugins: [
|
|
||||||
window.DocsifyCopyCodePlugin.init()
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
|
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
|
||||||
|
|
||||||
|
|
||||||
## Disqus
|
## Disqus
|
||||||
|
|
||||||
Disqus comments. https://disqus.com/
|
Disqus comments. https://disqus.com/
|
||||||
@@ -190,3 +176,4 @@ window.$docsify = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
全文搜索插件会根据当前页面上的超链接获取文档内容,在 `localStorage` 内建立文档索引。默认过期时间为一天,当然我们可以自己指定需要缓存的文件列表或者配置过期时间。
|
全文搜索插件会根据当前页面上的超链接获取文档内容,在 `localStorage` 内建立文档索引。默认过期时间为一天,当然我们可以自己指定需要缓存的文件列表或者配置过期时间。
|
||||||
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script>
|
<script>
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
@@ -91,7 +90,6 @@ When readers expand the demo box, the source code and description are shown ther
|
|||||||
|
|
||||||
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
|
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
|
||||||
|
|
||||||
|
|
||||||
## 图片缩放 - Zoom image
|
## 图片缩放 - Zoom image
|
||||||
|
|
||||||
Medium's 风格的图片缩放插件. 基于 [medium-zoom](https://github.com/francoischalifour/medium-zoom)。
|
Medium's 风格的图片缩放插件. 基于 [medium-zoom](https://github.com/francoischalifour/medium-zoom)。
|
||||||
@@ -100,41 +98,26 @@ Medium's 风格的图片缩放插件. 基于 [medium-zoom](https://github.com/fr
|
|||||||
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.js"></script>
|
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
忽略某张图片
|
忽略某张图片
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 在 Github 上编辑
|
## 在 Github 上编辑
|
||||||
|
|
||||||
在每一页上添加 `Edit on github` 按钮. 由第三方库提供, 查看 [document](https://github.com/njleonzhang/docsify-edit-on-github)
|
在每一页上添加 `Edit on github` 按钮. 由第三方库提供, 查看 [document](https://github.com/njleonzhang/docsify-edit-on-github)
|
||||||
|
|
||||||
|
|
||||||
## Copy to Clipboard
|
## Copy to Clipboard
|
||||||
|
|
||||||
Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
|
Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="//unpkg.com/docsify-copy-code/styles.css">
|
<script src="//unpkg.com/docsify-copy-code"></script>
|
||||||
<script src="//unpkg.com/docsify-copy-code/index.js"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
window.$docsify = {
|
|
||||||
plugins: [
|
|
||||||
window.DocsifyCopyCodePlugin.init()
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
|
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Disqus
|
## Disqus
|
||||||
|
|
||||||
Disqus comments. https://disqus.com/
|
Disqus comments. https://disqus.com/
|
||||||
@@ -148,7 +131,6 @@ Disqus comments. https://disqus.com/
|
|||||||
<script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script>
|
<script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Gitalk
|
## Gitalk
|
||||||
|
|
||||||
[Gitalk](https://github.com/gitalk/gitalk) is a modern comment component based on Github Issue and Preact.
|
[Gitalk](https://github.com/gitalk/gitalk) is a modern comment component based on Github Issue and Preact.
|
||||||
|
|||||||
Reference in New Issue
Block a user