https://github.com/zongren/hexo-algoliasearch-comment
A plugin to index comments of your Hexo blog on Algolia
https://github.com/zongren/hexo-algoliasearch-comment
Last synced: 12 months ago
JSON representation
A plugin to index comments of your Hexo blog on Algolia
- Host: GitHub
- URL: https://github.com/zongren/hexo-algoliasearch-comment
- Owner: zongren
- Created: 2017-04-08T06:07:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-26T07:02:47.000Z (about 3 years ago)
- Last Synced: 2025-07-31T14:43:08.136Z (12 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hexo-algoliasearch
A plugin to index comments of your Hexo blog on Algolia
## Installation
```
npm install hexo-algoliasearch-comment --save
```
If Hexo detect automatically all plugins, that's all.
If that is not the case, register the plugin in your `_config.yml` file :
```
plugins:
- hexo-algoliasearch-comment
```
## Configuration
You can configure this plugin in your `_config.yml` file :
``` yml
algolia_comment:
appId: "Z7A3XW4R2I"
apiKey: "12db1ad54372045549ef465881c17e743"
adminApiKey: "40321c7c207e7f73b63a19aa24c4761b"
chunkSize: 5000
indexName: "my-hexo-blog"
fields:
- name
- message
- path
- date
- url
```
| Key | Type | Default | Description |
| -------------- | ------ | ------- | ----------- |
| appId | String | | Your application ID. |
| apiKey | String | | Your API key (read only). It is use to search in an index. |
| adminApiKey | String | | Your adminAPI key. It is use to create, delete, update your indexes |
| chunkSize | Number | 5000 | Records/comments are split in chunks to upload them. Algolia recommend to use `5000` for best performance. Be careful, if you are indexing comment content, It can fail because of size limit. To overcome this, decrease size of chunks until it pass. |
| indexName | String | | The name of the index in which comments are stored. |
| fields | List | | The list of the field names to index. |
## Usage
```
hexo algoliaComment
```
#### Options
| Options | Description |
| -------------- | ----------- |
| -n, --no-clear | Does not clear the existing index |