2017-02-22 21:29:26 +08:00
# List of Plugins
2017-02-13 22:43:58 +08:00
2017-02-22 21:29:26 +08:00
## Full text search
2017-02-13 22:43:58 +08:00
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
< script >
window.$docsify = {
search: 'auto', // default
search : [
'/', // => /README.md
'/guide', // => /guide.md
'/get-started', // => /get-started.md
'/zh-cn/', // => /zh-cn/README.md
],
// 完整配置参数
search: {
maxAge: 86400000, // Expiration time, the default one day
paths: [], // or 'auto'
2017-02-19 11:22:34 +08:00
placeholder: 'Type to search',
// Localization
placeholder: {
'/zh-cn/': '搜索',
'/': 'Type to search'
2017-02-28 21:27:07 +08:00
},
noData: 'No Results!',
// Localization
noData: {
'/zh-cn/': '找不到结果',
'/': 'No Results'
2017-02-19 11:22:34 +08:00
}
2017-02-13 22:43:58 +08:00
}
}
< / script >
< script src = "//unpkg.com/docsify" > < / script >
< script src = "//unpkg.com/docsify/lib/plugins/search.js" > < / script >
```
2017-02-22 21:29:26 +08:00
## Google Analytics
2017-02-13 22:43:58 +08:00
Install the plugin and configure the track id.
```html
< script >
window.$docsify = {
ga: 'UA-XXXXX-Y'
}
< / script >
< script src = "//unpkg.com/docsify" > < / script >
< script src = "//unpkg.com/docsify/lib/plugins/ga.js" > < / script >
```
Configure by `data-ga` .
```html
< script src = "//unpkg.com/docsify" data-ga = "UA-XXXXX-Y" > < / script >
< script src = "//unpkg.com/docsify/lib/plugins/ga.js" > < / script >
```
2017-02-22 21:29:26 +08:00
## emoji
2017-02-13 22:43:58 +08:00
2017-02-22 21:29:26 +08:00
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.
2017-02-13 22:43:58 +08:00
2017-02-22 21:29:26 +08:00
```html
< script src = "//unpkg.com/docsify/lib/plugins/emoji.js" > < / script >
2017-02-13 22:43:58 +08:00
```
2017-03-06 23:57:28 +08:00
## External Script
If the script on the page is an external one (imports a js file via `src` attribute), you'll need this plugin to make it work.
```html
< script src = "//unpkg.com/docsify/lib/plugins/external-script.js" > < / script >
```
2017-03-09 20:26:33 +08:00
## Zoom image
Medium's Image Zoom. Based on [zoom-image ](https://github.com/egoist/zoom-image ).
```html
< script src = "//unpkg.com/docsify/lib/plugins/zoom-image.js" > < / script >
```