1 <script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
2 <script src=
"{{'assets/tipuesearch/tipuesearch_set.js' | relative_url }}"></script>
3 <script type=
"text/javascript">
4 {% capture search_data
%}
5 {% for entry
in site
.pages
%}
6 {% unless entry
.tags contains
'no_search' %}
7 {% assign size
= entry
.url
.size
| plus
: 0 %}
8 {% assign neg_one
= size
| minus
: 1 %}
9 {% assign neg_five
= size
| minus
: 5 %}
10 {% assign last_char
= entry
.url
| slice
: neg_one
, size
%}
11 {% assign last_five
= entry
.url
| slice
: neg_five
, size
%}
12 {% if last_char
== "/" or last_five
== ".html" %}
13 {% assign search_text
= entry
.content
| split
: '<!-- SEARCH-CONTENT-START -->' | last
| split
: '<!-- SEARCH-CONTENT-END -->' | first
%}
14 {% if search_text contains
'<!-- TOC-START -->' %}
15 {% assign s1
= search_text
| split
: '<!-- TOC-START -->' | first
%}
16 {% assign s2
= search_text
| split
: '<!-- TOC-END -->' | last
%}
17 {% assign search_text
= s1
| append
: s2
%}
19 {"title": "{{entry.title}}",
20 "text": {{search_text
| strip_html
| jsonify
}},
21 "tags": "{{entry.tags | join: ' '}}",
22 "url": "{{ site.baseurl }}{{ entry.url }}"},
27 var tipuesearch
= {"pages": [{{search_data
}}]};
29 <script src=
"{{'assets/tipuesearch/tipuesearch.min.js' | relative_url }}"></script>
31 $(document
).ready(function() {
32 $('#tipue_search_input').tipuesearch({