Hexo-NexT v8.x搜索服务配置
Hexo-NexT v8.x搜索服务配置
我的blog配置成功了,可喜可贺,这个网络上很多都对不上8.x版本,所以看下面这个链接
NexT8.x文档
1.首先下载
1 | $ npm install hexo-generator-searchdb –save |
2.然后在站点配置文件Hexo _config.yml在底部添加
1 2 3 4 5 | search: path: search.xml field: post content: true format: html |
3.最后在主题配置文件NexT _config.yml中打开Local Search功能,就是把enable改为true
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: false # 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 |