diff --git a/README.md b/README.md index b98a44f70c07bca4531cb6ab1e8455835dfaf0b5..b120c1c1ccc0c9ea16d87036004f10d4ab154535 100644 --- a/README.md +++ b/README.md @@ -278,8 +278,7 @@ This theme has support for the All you have to do, is: - enable the plugin, and the theme will add a search box on the right side of the menu -- Add `DIRECT_TEMPLATES = (('search',))` in your `pelicanconf.py`. - +- Add `'search'` to the `DIRECT_TEMPLATES` in your `pelicanconf.py`. E.g. `DIRECT_TEMPLATES = ('index', 'categories', 'authors', 'archives', 'search'). ### Footer diff --git a/templates/includes/minify_tipuesearch.html b/templates/includes/minify_tipuesearch.html new file mode 100644 index 0000000000000000000000000000000000000000..dff9542ac4b6d2bd7cc6b68e3ee3f819c125f9d3 --- /dev/null +++ b/templates/includes/minify_tipuesearch.html @@ -0,0 +1,3 @@ +{% assets filters="rjsmin", output="tipuesearch/tipuesearch.packed.min.js", "tipuesearch/tipuesearch_set.js", "tipuesearch/tipuesearch.js" %} +<script type="text/javascript" src="{{ SITEURL }}/{{ ASSET_URL }}"></script> +{% endassets %} diff --git a/templates/search.html b/templates/search.html index a04b52f0236db36528a8fd85f8b1f69845154c13..efd0009c58c09f229b17013a478301b4021460d9 100644 --- a/templates/search.html +++ b/templates/search.html @@ -6,7 +6,7 @@ Search - {{ super() }} {% block scripts %} {% if 'assets' in PLUGINS %} - {% include '_includes/minify_tipuesearch.html' with context %} + {% include 'includes/minify_tipuesearch.html' with context %} {% else %} <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.css" rel="stylesheet"> <script type="text/javascript" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.js"></script>