Add tipue search integration

Integrated tipue search plugin functionality (https://github.com/getpelican/pelican-plugins/tree/master/tipue_search), to use add USE_TIPUE_SEARCH = True to pelicanconf.py and optional search.html page
This commit is contained in:
Fizban 2019-12-12 19:51:42 +11:00
parent bb3ca5f4e1
commit 5ba7257eeb
8 changed files with 1237 additions and 1 deletions

19
templates/search.html Normal file
View file

@ -0,0 +1,19 @@
{% if 'search' in DIRECT_TEMPLATES and USE_TIPUE_SEARCH %} {% extends 'base.html' %} {% block title %} Search - {{ SITENAME|striptags }} {% endblock title %} {% block content %}
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch({
'show': 10,
'mode': 'json',
'contentLocation': '{{ SITEURL }}/tipuesearch_content.js'
});
});
</script>
<article class="single">
<header>
<h1 id="categories">{{ _('Search Results') }}</h1>
</header>
<div id="tipue_search_content"></div>
</article>
{% endblock content %} {% endif %}