From cd7d10f5c96ca703f6e343d72f80b2f16080479e Mon Sep 17 00:00:00 2001 From: lioman Date: Tue, 9 Mar 2021 08:57:48 +0100 Subject: [PATCH 1/6] move search files to search page - To speed up page load the js files should be loaded on bottom of page. - search files are only needed if you search. Move them to search page - instantiate tipue search only on search page --- templates/base.html | 12 ------------ templates/search.html | 39 +++++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/templates/base.html b/templates/base.html index 5ff35dc..0da863e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -295,18 +295,6 @@ {% include 'partial/github.html' %} {% endif %} - {% if PLUGINS and 'tipue_search' in PLUGINS %} - - - - - - {% endif %} - {% block additional_js %}{% endblock %} diff --git a/templates/search.html b/templates/search.html index 1252834..1a6128b 100644 --- a/templates/search.html +++ b/templates/search.html @@ -1,22 +1,25 @@ -{% if PLUGINS and 'tipue_search' in PLUGINS %} -{% extends 'base.html' %} -{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %} +{% if PLUGINS and 'tipue_search' in PLUGINS %} {% extends 'base.html' %} {% +block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %} {% block content %} -
-
-

{{ _('Search Results') }}

-
-
+
+

{{ _('Search Results') }}

+
+
-{% endblock content %} -{% endif %} +{% endblock content %} {% block additional_js %} + + + + + +{% endblock %} {% endif %} From 1b2844e92673c5efad1d01df5be30a22f3ef55fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20Kirchg=C3=A4ssner?= Date: Fri, 2 Sep 2022 09:43:56 +0200 Subject: [PATCH 2/6] check for seo, neighbors as namespace plugins These two plugins moved recently to new versions. They have a module name preceeded by 'pelican.plugins.' --- templates/partial/jsonld_article.html | 2 +- templates/partial/neighbors.html | 2 +- templates/partial/og.html | 2 +- templates/partial/og_article.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/partial/jsonld_article.html b/templates/partial/jsonld_article.html index abcc32b..c4ba80e 100644 --- a/templates/partial/jsonld_article.html +++ b/templates/partial/jsonld_article.html @@ -1,4 +1,4 @@ -{% if not PLUGINS or 'seo' not in PLUGINS %} +{% if not PLUGINS or 'seo' not in PLUGINS or 'pelican.plugins.seo' not in PLUGINS%} {% if SITELOGO %} {% set default_cover = SITELOGO %} {% else %} diff --git a/templates/partial/neighbors.html b/templates/partial/neighbors.html index a03a9e1..65bfada 100644 --- a/templates/partial/neighbors.html +++ b/templates/partial/neighbors.html @@ -1,4 +1,4 @@ -{% if PLUGINS and 'neighbors' in PLUGINS %} +{% if PLUGINS and ('neighbors' in PLUGINS or 'pelican.plugins.neighbors' in PLUGINS) %}
{% if article.prev_article %} diff --git a/templates/partial/og.html b/templates/partial/og.html index 7195851..3fc5d67 100644 --- a/templates/partial/og.html +++ b/templates/partial/og.html @@ -1,4 +1,4 @@ -{% if not PLUGINS or 'seo' not in PLUGINS %} +{% if not PLUGINS or 'seo' not in PLUGINS or 'pelican.plugins.seo' not in PLUGINS %} {% if OG_LOCALE %} {% set default_locale = OG_LOCALE %} {% else %} diff --git a/templates/partial/og_article.html b/templates/partial/og_article.html index 9a929bf..2039946 100644 --- a/templates/partial/og_article.html +++ b/templates/partial/og_article.html @@ -1,4 +1,4 @@ -{% if not PLUGINS or 'seo' not in PLUGINS %} +{% if not PLUGINS or 'seo' not in PLUGINS or 'pelican.plugins.seo' not in PLUGINS %} {% if OG_LOCALE %} {% set default_locale = OG_LOCALE %} {% else %} From 82de4cb50446f7ae6b94143344afa33252bdc855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20Kirchg=C3=A4ssner?= Date: Tue, 6 Sep 2022 09:51:50 +0200 Subject: [PATCH 3/6] load stork index on click --- templates/partial/sidebar.html | 2 +- templates/partial/stork.html | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/templates/partial/sidebar.html b/templates/partial/sidebar.html index 4a447c1..7f30501 100644 --- a/templates/partial/sidebar.html +++ b/templates/partial/sidebar.html @@ -23,7 +23,7 @@ {% elif 'pelican.plugins.search' in PLUGINS %}
- +
{% endif %} diff --git a/templates/partial/stork.html b/templates/partial/stork.html index aa04e0b..35a045a 100644 --- a/templates/partial/stork.html +++ b/templates/partial/stork.html @@ -1,13 +1,12 @@ {% if 'pelican.plugins.search' in PLUGINS %} + {% if STORK_VERSION %} - {% else %} - {% endif %} {% endif %} From f98b769a70d8c39d2933ab9cff5672c8b2839214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20Kirchg=C3=A4ssner?= Date: Tue, 6 Sep 2022 10:03:56 +0200 Subject: [PATCH 4/6] fix load of self hosted wasm --- templates/partial/stork.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/partial/stork.html b/templates/partial/stork.html index 35a045a..10f3e09 100644 --- a/templates/partial/stork.html +++ b/templates/partial/stork.html @@ -1,6 +1,9 @@ {% if 'pelican.plugins.search' in PLUGINS %} From 5830ea3381b8d7fe88cf2429b002d5fd65013610 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Thu, 8 Sep 2022 12:17:10 +0200 Subject: [PATCH 5/6] Add the possibility to link against a PGP key --- templates/base.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/base.html b/templates/base.html index f81ca30..555005c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -100,6 +100,10 @@ {% include "partial/ga.html" %} {% include "partial/ggst.html" %} + {% if PGP_KEY %} + + {% endif %} + {% if not PLUGINS or 'seo' not in PLUGINS %} {% if REL_CANONICAL %} {% if page %} From f65ae0001d063f96374999138f92aad3231b6370 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Thu, 8 Sep 2022 12:24:52 +0200 Subject: [PATCH 6/6] Added Webmentions and Pingbacks --- templates/base.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/base.html b/templates/base.html index 555005c..1c296af 100644 --- a/templates/base.html +++ b/templates/base.html @@ -104,6 +104,13 @@ {% endif %} + {% if WEBMENTION_URL %} + + {% endif %} + {% if PINGBACK_URL %} + + {% endif %} + {% if not PLUGINS or 'seo' not in PLUGINS %} {% if REL_CANONICAL %} {% if page %}