Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/kricsleo/hexo-elasticsearch
- Owner: kricsleo
- License: mit
- Created: 2019-05-09T02:19:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-07T04:59:55.000Z (over 2 years ago)
- Last Synced: 2023-03-02T20:46:04.432Z (over 1 year ago)
- Topics: elasticsearch, hexo, hexo-plugin
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/hexo-elasticsearch
- Size: 15.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.