zoukankan      html  css  js  c++  java
  • Hexo next主题添加站内搜索功能

    根据关键字搜索博文,站内搜索的功能很实用。hexo开启站内搜索很方便,已经有现成的插件可以使用,也是为了方便自己

    1. 安装插件
    npm install hexo-generator-search  --save
    npm install hexo-generator-searchdb --save
    
    1. 配置hexo站点主配置文件_config.yml,在文件末尾添加
    search:
      path: search.xml
      field: post
      format: html
      limit: 10000
    
    1. 修改next主题配置文件_config.yml,启用 local_search
    # Local search
    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
    

    将 enable的 false改为true

    这样就开启了站内搜索了。

    References
    1. Hexo开启站内搜索功能
  • 相关阅读:
    08简单推导:手机尾号评分
    07简单推导:生日蜡烛
    06普通推导
    05简单推导:猴子吃桃
    简单推导
    03map用法
    List题目
    02List的使用
    01基础知识
    HDU
  • 原文地址:https://www.cnblogs.com/fsong/p/11759136.html
Copyright © 2011-2022 走看看