docs(plugin): add search doc
This commit is contained in:
parent
2351c3e68c
commit
515331763d
2 changed files with 16 additions and 4 deletions
|
|
@ -23,7 +23,13 @@ By default, the hyperlink on the current page is recognized and the content is s
|
||||||
search: {
|
search: {
|
||||||
maxAge: 86400000, // Expiration time, the default one day
|
maxAge: 86400000, // Expiration time, the default one day
|
||||||
paths: [], // or 'auto'
|
paths: [], // or 'auto'
|
||||||
placeholder: 'Type to search'
|
placeholder: 'Type to search',
|
||||||
|
|
||||||
|
// Localization
|
||||||
|
placeholder: {
|
||||||
|
'/zh-cn/': '搜索',
|
||||||
|
'/': 'Type to search'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -101,7 +107,7 @@ window.$docsify = {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
!> You can get internal methods through `window.Docsify.utils`.
|
!> You can get internal methods through `window.Docsify`. Get the current instance through the second argument.
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,13 @@
|
||||||
search: {
|
search: {
|
||||||
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
|
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
|
||||||
paths: [], // or 'auto'
|
paths: [], // or 'auto'
|
||||||
placeholder: 'Type to search'
|
placeholder: 'Type to search',
|
||||||
|
|
||||||
|
// 支持本地化
|
||||||
|
placeholder: {
|
||||||
|
'/zh-cn/': '搜索',
|
||||||
|
'/': 'Type to search'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -96,7 +102,7 @@ window.$docsify = {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
!> 如果需要用 docsify 的内部方法,可以通过 `window.Docsify.utils` 获取。
|
!> 如果需要用 docsify 的内部方法,可以通过 `window.Docsify` 获取,通过 `vm` 获取当前实例。
|
||||||
|
|
||||||
#### 例子
|
#### 例子
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue