首先,在 Hexo 的 Next 主題開啟 Local Search 非常容易, 只要在 themes\next\_config.yml 中,找到:
1 2 3 4 5 6 7 8 9 10 11
# Local search # Dependencies: https://github.com/theme-next/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