Giter Club home page Giter Club logo

hexo-search's Introduction

Hexo-Search

hexo博客搜索插件

jekyll博客搜索插件请前往 Jekyll-Search

截图

hexo-search.jpg

也可以打开http://codeboy.me查看效果

操作

  1. 点击右下角图标进行搜索
  2. 双击ctrl键进行搜索或关闭
  3. 搜索页面点击右上角关闭按钮关闭搜索试图

加入步骤

  1. 安装搜索插件:

    npm install hexo-search-data-plugin --save
    

    或者在package.json中添加一下依赖:

    "hexo-search-data-plugin":"^1.0.0"
    

    之后执行npm update即可

  2. 将search目录放至于hexo主题的source文件夹下,其中search目录结构如下:

     search
     ├── cb-footer-add.html
     ├── css
     │   └── cb-search.css
     ├── img
     │   ├── cb-close.png
     │   └── cb-search.png
     └── js
         ├── bootstrap3-typeahead.min.js
         └── cb-search.js
    
  3. 在当前主题的layout/_partial/after-footer.ejs 中的末尾加入 cb-footer-add.html 中的内容即可, 添加完毕后 cb-footer-add.html 文件可以删除。

如果主题不存在after-footer.ejs文件,也可以添加在footer.ejs中。

注意事项

  1. bootstrap3-typeahead.min.js 的引入必须在jquery.min.js引入之后!

  2. 默认联想8个,如果需要更多的话,请检索 bootstrap3-typeahead.min.js 中的items:8, 将8替换成自己需要的数值。

  3. 文章标题请不要使用回车等符号,回车等符号会造成json解析错误。

更新历史

v1.0.1

  • 添加错误console输出。搜索没提示,看console。

v1.0.0

  • 支持hexo博客中进行文章搜索。

有任何问题何以发送邮件到[email protected]进行交流。

hexo-search's People

Contributors

androiddevelop avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.