1.2.6 • Published 3 years ago

hexo-tipue-search-db v1.2.6

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

hexo-tipue-search-db

Hexo plugin to generate db content for Tipue Search 7.1 +, base on Hexo-Tipue-Search-Json.

How to install

$ npm install hexo-tipue-search-db --save

How to configure (You can do your customization)

  1. Download Tipue Search zip from here, unzip it, and copy /tipuesearch to your ${theme_dir}/source

  2. Add js code in ${theme_dir}/layout/_partial/head.ejs (or some file like this one)

<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>

<script src="tipuesearch/tipuesearch_content.js"></script>
<link rel="stylesheet" href="tipuesearch/tipuesearch.css">
<script src="tipuesearch/tipuesearch_set.js"></script>
<script src="tipuesearch/tipuesearch.min.js"></script>
  1. The code below creates a search box, and can be anywhere on your page. Search results are displayed in the tipue_search_content div. You can optimize it, of course.
<form>
  <div class="tipue_search_group">
    <input type="text" name="q" id="tipue_search_input" pattern=".{3,}" title="At least 3 characters" required><button type="submit" class="tipue_search_button"><div class="tipue_search_icon">&#9906;</div></button>
  </div>
</form>
<div id="tipue_search_content"></div>

<script>
  $(document).ready(function() {
       $('#tipue_search_input').tipuesearch();
  });
</script>

Plugin config

Default posts and pages are included in generated db file, you can exclude pages by exclude_page: true.

tipue_search_db:
  exclude_page: true    # default false

DB file

The default db file path is: ${blog_root}/tipuesearch/tipuesearch_content.js, you can use custom file path by params path

tipue_search_db:
  path: '/tipuesearch/tipuesearch_content.js'     # file path

Thanks For

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago