Hexo追加検索機能

833 ワード

について
時間が経つにつれて、個人サイトのブログ記事が増えていきますが、どのようにして印象に残っている文章を素早く見つけることができますか?1つのサイト内の検索機能を追加する必要があり、便利です.
具体的な操作
1.インストール検索:Hexoのルートディレクトリの下で、コマンド実行可能ウィンドウを開き、以下のコマンドを実行する.
npm install hexo-generator-searchdb --save

2.グローバルプロファイル_config.yml、次の内容が追加されました.
search:
  path: search.xml
  field: post
  format: html
  limit: 10000

3.hexoトピックプロファイル(themesext_config.yml)、local_を変更searchのenableはtrueです.
# Local search
# Dependencies: https://github.com/flashlab/hexo-generator-search
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

個人サイトの先発