Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

站内搜索

配置代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# To use hexo search, you need to install the following plugins:
# npm i hexo-generator-json-content
search:
enable: true
service: hexo # hexo, algolia, meilisearch
algolia:
searchAsYouType: true # If false, triggers the search only on submit.
hitsPerPage: 5 # Set the number of hits per page.
placeholder: 'Search...' # The placeholder text of the input.
meilisearch:
placeholder: 'Search...'
searchKey: ''
indexName: ''
hostUrl: ''

显然这段没啥用,因为我们不需要使用algolia搜索等等

  1. 你需要安装 hexo-generator-json-content,并根据它的文档去做相应配置。
  2. 修改 主题配置文件
1
2
3
search:
enable: true
service: hexo

评论