How To Setup Hexo With Next

Install Tools

Install Next them

1
git clone https://github.com/theme-next/hexo-theme-next themes/next

Install hexo-renderre-swig

1
sudo npm install hexo-renderer-swig

Install hexo-generator-searchdb by executing following command in site root dir:

1
npm install hexo-generator-searchdb

Add follow config to Hexo Config

1
2
3
4
5
search:
path: search.xml
field: post
content: true
format: html

Change Next Config as follow

1
2
3
4
5
6
7
8
9
10
11
12
13
# Local search
# Dependencies: https://github.com/next-theme/hexo-generator-searchdb
local_search:
enable: true
# If auto, trigger search by changing input.
# If manual, trigger search by pressing enter key or search button.
trigger: auto
# Show top n results per article, show all results by setting to -1
top_n_per_article: 1
# Unescape html strings to the readable one.
unescape: false
# Preload the search data when the page loads.
preload: false