From 1e31ab9b50d9c4d8398f3611c15563c1841f092d Mon Sep 17 00:00:00 2001 From: Georg Lutz Date: Tue, 28 Dec 2021 22:11:17 +0100 Subject: [PATCH] Fix tipue search The tipue plugin registers itself as pelican.plugins.tipue_search (namespace plugin) in the latest version see here: https://github.com/getpelican/pelican-plugins/commit/7fe8f3f05cd1f39951967010586025e2230c0ede Keep old style tipue_search to be compatible with old versions. To use the search one would need to add "search" to DIRECT_TEMPLATES in pelicanconf.py so that search.html is copied to the output folder: DIRECT_TEMPLATES = ["index", "tags", "categories", "archives", "search"] --- templates/base.html | 4 ++-- templates/search.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/base.html b/templates/base.html index fca8d45..ffb8fc0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -69,7 +69,7 @@ href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE|default('github') }}.min.css"> {% endif %} - {% if PLUGINS and 'tipue_search' in PLUGINS %} + {% if PLUGINS and ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS) %} {% endif %} @@ -174,7 +174,7 @@ {% if SITESUBTITLE %}

{{ SITESUBTITLE }}

{% endif %} - {% if PLUGINS and 'tipue_search' in PLUGINS %} + {% if PLUGINS and ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS)%} diff --git a/templates/search.html b/templates/search.html index 2af8292..9a15f65 100644 --- a/templates/search.html +++ b/templates/search.html @@ -1,4 +1,4 @@ -{% if PLUGINS and 'tipue_search' in PLUGINS %} +{% if PLUGINS and ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS) %} {% extends 'base.html' %} {% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %} {% block content %}