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

View file

@ -28,6 +28,15 @@
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.min.css">
{% endif %}
{% if USE_TIPUE_SEARCH %}
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/jquery.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.js"></script>
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.css" />
<script src="{{ SITEURL }}/tipuesearch_content.js"></script>
{% endif %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE|default('github') }}.min.css">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/fontawesome.css">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/brands.css">
@ -103,7 +112,11 @@
<h1><a href="{{ SITEURL }}">{{ SITETITLE }}</a></h1>
{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}
{% if USE_TIPUE_SEARCH %}
<form class="navbar-search" action="/search.html" role="search">
<input type="text" name="q" id="tipue_search_input" placeholder="Search..">
</form>
{% endif %}
{% if pages or LINKS %}
<nav>
<ul class="list">
@ -218,5 +231,13 @@
{% if GITHUB_CORNER_URL %}
{% include 'partial/github.html' %}
{% endif %}
{% if USE_TIPUE_SEARCH %}
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch();
});
</script>
{% endif %}
</body>
</html>