> For the complete documentation index, see [llms.txt](https://lh1me.gitbook.io/aomori/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lh1me.gitbook.io/aomori/cn/features/search.md).

# 搜索

{% hint style="info" %}
需要配置在 **全局 `_config.yml`**
{% endhint %}

### Algolia <a href="#algolia" id="algolia"></a>

注册 [Algolia](https://www.algolia.com/) 账号，并创建 Index

安装 [hexo-algolia](https://github.com/oncletom/hexo-algolia)

```css
npm install --save hexo-algolia
```

在站点 `_config.yml` 填入 Algolia 配置

```vbnet
algolia:
    applicationID: 'applicationID'
    apiKey: 'apiKey'
    indexName: '...'
```

配置在 Algolia > API Keys 可以找到

运行下面的命令更新数据

```shell
$ export HEXO_ALGOLIA_INDEXING_KEY=High-privilege API key # Use Git Bash
# set HEXO_ALGOLIA_INDEXING_KEY=High-privilege API key # Use Windows command line
$ hexo clean
$ hexo algolia
```

注意，以后发新文章后都需要运行 `hexo algolia` 更新搜索数据

在站点 `_config.yml` 打开搜索功能

```vbnet
aomori_search_algolia: true
```
