--- author: YJG comments: true date: 2019-05-05 23:27:32+00:00 layout: post title: jekyll 博客 搜索 插件 description: jekyll 博客 搜索 插件 eywords: Markdown,Tech flowchart: true categories: - Tech tags: - 日记 --- * 目录 {:toc} --- # Jekyll-Search #### **jekyll博客搜索插件** hexo博客搜索插件请前往 [Hexo-Search](https://github.com/androiddevelop/hexo-search) ### 截图 ![jekyll-search.jpg](https://www.codeboy.me/img/jekyll-search.jpg) 也可以打开[http://codeboy.me](http://codeboy.me)查看效果 ### 操作 1. 点击右下角图标进行搜索 2. 双击ctrl键进行搜索或关闭 3. 搜索页面点击右上角关闭按钮关闭搜索试图 ### 加入步骤 1. 将search目录放至于博客根目录下,其中search目录结构如下: search ├── cb-footer-add.html ├── cb-search.json ├── css │   └── cb-search.css ├── img │   ├── cb-close.png │   └── cb-search.png └── js ├── bootstrap3-typeahead.min.js └── cb-search.js 2. 在 `_include/footer.html` 中的 `` 后加入 `cb-footer-add.html` 中的内容即可。 ### 注意事项 1.需要事先引入**jquery**与**bootstrap3(js与css文件)**框架,如果没有的话,操作如下: 在`_include/head.html` 中引入以下代码: ``` ``` 在`_include/footer.html` 中引入以下代码: ``` ``` **`bootstrap3-typeahead.min.js` 的引入必须在`jquery.min.js`引入之后,即在`footer.html`中的行数更靠后!** 2.默认联想8个,如果需要更多的话,请检索 `bootstrap3-typeahead.min.js` 中的**items:8**, 将**8**替换成自己需要的数值。 3. 文章标题请不要使用回车等符号,回车等符号会造成json解析错误。 ### 更新历史 #### v1.0.2 - 添加错误console输出。 #### v1.0.1 - 增加firefox支持。 #### v1.0.0 - 支持jekyll中进行文章搜索。 ## License ``` Copyright 2016 Yuedong.li Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` > 有任何问题,欢迎发送邮件到app@codeboy.me交流.