docs: add algolia search config

pull/165/head
Kia King Ishii 4 years ago
parent 7aa3fb261b
commit 6bd6b53c4d

@ -67,14 +67,15 @@ function getConfigSidebar() {
return [ return [
{ {
text: 'App Config', text: 'App Config',
children: [ children: [{ text: 'Basics', link: '/config/basics' }]
{ text: 'Basics', link: '/config/basics' },
{ text: 'Carbon Ads', link: '/config/carbon-ads' }
]
}, },
{ {
text: 'Theme Config', text: 'Theme Config',
children: [{ text: 'Homepage', link: '/config/homepage' }] children: [
{ text: 'Homepage', link: '/config/homepage' },
{ text: 'Algolia Search', link: '/config/algolia-search' },
{ text: 'Carbon Ads', link: '/config/carbon-ads' }
]
} }
] ]
} }

@ -0,0 +1,16 @@
# Theme Config: Algolia Search
The `themeConfig.algolia` option allows you to use [Algolia DocSearch](https://docsearch.algolia.com/). To enable it, you need to provide at least apiKey and indexName:
```js
module.exports = {
themeConfig:{
algolia: {
apiKey: 'your_api_key',
indexName: 'index_name'
}
}
}
```
For more options, check out [Algolia DocSearch's documentation](https://github.com/algolia/docsearch#docsearch-options).

@ -1,13 +1,15 @@
# App Config: Carbon Ads # Theme Config: Carbon Ads
VitePress has built in native support for [Carbon Ads](https://www.carbonads.net). By defining the Carbon Ads credentials in config, VitePress will display ads on the page. VitePress has built in native support for [Carbon Ads](https://www.carbonads.net). By defining the Carbon Ads credentials in config, VitePress will display ads on the page.
```js ```js
module.exports = { module.exports = {
carbonAds: { themeConfig: {
carbon: 'your-carbon-key', carbonAds: {
custom: 'your-carbon-custom', carbon: 'your-carbon-key',
placement: 'your-carbon-placement' custom: 'your-carbon-custom',
placement: 'your-carbon-placement'
}
} }
} }
``` ```

Loading…
Cancel
Save