Frame now supports local search with the hexo plugin hexo-generator-searchdb. To enable local search, please follow the steps below:

1. Installation

Install the hexo-generator-searchdb plugin under the hexo project file:

1
$ npm install hexo-generator-searchdb

2. Hexo Configuration

Go to the hexo configuration file config.yml, and add the following content:

1
2
3
4
5
6
# Search
search:
path: search.xml
field: all
content: true
format: html

Note: you can go to this documentation to figure out the meaning of each argument above.

3. Theme Configuration

Go to the config.yml file under the frame theme folder, and modify the following settings:

1
2
3
4
5
6
7
8
# local search
local_search:
enable: true
place_holder: Search Anything
trigger: auto # auto: trigger search whenever input changes
top_n_per_article: 1 # show top n results per article, show all results by setting to -1
unescape: false # unescape html strings to the readable one
preload: false # reload the search data when the page loads, this will accelerate the search process