mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
feat: customizable search placeholder (#1126)
* feat: customizable search placeholder * prettier
This commit is contained in:
parent
711c15d3e3
commit
c6f3f0958d
2 changed files with 17 additions and 2 deletions
|
@ -61,6 +61,20 @@ const siteConfig = {
|
|||
};
|
||||
```
|
||||
|
||||
## Customizing the placeholder
|
||||
|
||||
If you want to change the placeholder (which defaults to *Search*), add the `placeholder` field in your config. For example, you may want the search bar to display *Ask me something*:
|
||||
|
||||
```js
|
||||
const siteConfig = {
|
||||
...
|
||||
algolia: {
|
||||
...
|
||||
placeholder: 'Ask me something'
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Disabling the Search Bar
|
||||
|
||||
To disable the search bar, comment out (recommended) or delete the `algolia` section in the `siteConfig.js` file.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue