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 [
{
text: 'App Config',
children: [
{ text: 'Basics', link: '/config/basics' },
{ text: 'Carbon Ads', link: '/config/carbon-ads' }
]
children: [{ text: 'Basics', link: '/config/basics' }]
},
{
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.
```js
module.exports = {
carbonAds: {
carbon: 'your-carbon-key',
custom: 'your-carbon-custom',
placement: 'your-carbon-placement'
themeConfig: {
carbonAds: {
carbon: 'your-carbon-key',
custom: 'your-carbon-custom',
placement: 'your-carbon-placement'
}
}
}
```

Loading…
Cancel
Save