Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kricsleo/hexo-elasticsearch

synchronize hexo posts to elasticsearch
https://github.com/kricsleo/hexo-elasticsearch

elasticsearch hexo hexo-plugin

Last synced: 24 days ago
JSON representation

synchronize hexo posts to elasticsearch

Awesome Lists containing this project

README

        

# hexo-elasticsearch

`hexo-elasticsearch` is a [hexo](https://hexo.io/) plugin help to synchronize your post to elasticsearch. You have to deploy your own elasticsearch server first before you start.

I mainly want to use elasticsearch for the searching of [my blog](https://kricsleo.com), so I made this plugin to synchronize my articles to the elasticsearch every time I make a change to the article, by using `hexo g` or `hexo s`

## Installation

```js
npm i -S hexo-elasticsearch
```

## usage

Configuring your elasticsearch info in `_config.yml`

```yml
elasticsearch:
# your elasticsearch host, default: 127.0.0.1
host: 127.0.0.1
# your elasticsearch port, default: 9200
port: 9200
# the index to save your articles, default: blog
index: blog
# the type in the index to save your articles, default: article
type: article
# timeout when operating elasticsearch, default: 30000
timeout: 30000
# date format for formating post date and update date, default: YYYY-MM-DD, like: 2019-05-08
dateFormat: YYYY-MM-DD
```

After configuring your elasticsearch info, every time you run `hexo g` or `hexo s`, your posts will be synchronized to your elasticsearch.

Then you can check your elasticsearch for your posts.