Merge branch 'master' into plausible

This commit is contained in:
Alexandre Vicenzi 2022-12-01 12:04:49 +01:00 committed by GitHub
commit d22e93597a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 15 deletions

View file

@ -100,8 +100,21 @@
{% include "partial/ga.html" %} {% include "partial/ga.html" %}
{% include "partial/ggst.html" %} {% include "partial/ggst.html" %}
{% include "partial/plausible.html" %} {% include "partial/plausible.html" %}
{% if PGP_KEY %}
<link rel="pgpkey" type="application/pgp-keys" href="{{ SITEURL }}/{{ PGP_KEY }}">
{% endif %}
{% if WEBMENTION_URL %}
<link rel="webmention" href="{{ WEBMENTION_URL }}" />
{% endif %}
{% if PINGBACK_URL %}
<link rel="pingback" href="{{ PINGBACK_URL }}" />
{% endif %}
{% if not PLUGINS or 'seo' not in PLUGINS %} {% if not PLUGINS or 'seo' not in PLUGINS %}
{% if REL_CANONICAL %} {% if REL_CANONICAL %}
{% if page %} {% if page %}

View file

@ -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 %} {% if SITELOGO %}
{% set default_cover = SITELOGO %} {% set default_cover = SITELOGO %}
{% else %} {% else %}

View file

@ -1,4 +1,4 @@
{% if PLUGINS and 'neighbors' in PLUGINS %} {% if PLUGINS and ('neighbors' in PLUGINS or 'pelican.plugins.neighbors' in PLUGINS) %}
<div class="neighbors"> <div class="neighbors">
{% if article.prev_article %} {% if article.prev_article %}
<a class="btn float-left" href="{{ SITEURL }}/{{ article.prev_article.url }}" title="{{ article.prev_article.title|striptags }}"> <a class="btn float-left" href="{{ SITEURL }}/{{ article.prev_article.url }}" title="{{ article.prev_article.title|striptags }}">

View file

@ -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 %} {% if OG_LOCALE %}
{% set default_locale = OG_LOCALE %} {% set default_locale = OG_LOCALE %}
{% else %} {% else %}

View file

@ -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 %} {% if OG_LOCALE %}
{% set default_locale = OG_LOCALE %} {% set default_locale = OG_LOCALE %}
{% else %} {% else %}

View file

@ -23,7 +23,7 @@
</form> </form>
{% elif 'pelican.plugins.search' in PLUGINS %} {% elif 'pelican.plugins.search' in PLUGINS %}
<div class="stork"> <div class="stork">
<input class="stork-input" type="text" autocomplete="off" name="q" data-stork="sitesearch" placeholder="{{ _('Search...') }}"/> <input class="stork-input" type="text" autocomplete="off" name="q" data-stork="sitesearch" placeholder="{{ _('Search...') }}" onclick="loadStorkIndex()"/>
<div class="stork-output" data-stork="sitesearch-output"></div> <div class="stork-output" data-stork="sitesearch-output"></div>
</div> </div>
{% endif %} {% endif %}

View file

@ -1,13 +1,15 @@
{% if 'pelican.plugins.search' in PLUGINS %} {% if 'pelican.plugins.search' in PLUGINS %}
<script>
window.loadStorkIndex = function () {
{% if not STORK_VERSION %}
stork.initialize("{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stork/stork.wasm")
{% endif %}
stork.register("sitesearch", "{{ SITEURL }}/search-index.st", { showProgress: false });
}
</script>
{% if STORK_VERSION %} {% if STORK_VERSION %}
<script src="https://files.stork-search.net/releases/v{{ STORK_VERSION }}/stork.js"></script> <script src="https://files.stork-search.net/releases/v{{ STORK_VERSION }}/stork.js"></script>
<script>
stork.register("sitesearch", "{{ SITEURL }}/search-index.st", {showProgress: false});
</script>
{% else %} {% else %}
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stork/stork.js"></script> <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stork/stork.js"></script>
<script>
stork.register("sitesearch", "{{ SITEURL }}/search-index.st", {showProgress: false});
</script>
{% endif %} {% endif %}
{% endif %} {% endif %}

View file

@ -2,14 +2,14 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %} {% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
{% block content %} {% block content %}
<article class="single"> <article class="single">
<header> <header>
<h1 id="categories">{{ _('Search Results') }}</h1> <h1 id="categories">{{ _('Search Results') }}</h1>
</header> </header>
<div id="tipue_search_content"></div> <div id="tipue_search_content"></div>
</article> </article>
{% endblock content %} {% endblock content %} {% block additional_js %}
{% block additional_js %}
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/jquery.min.js"></script> <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.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.min.js"></script> <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.min.js"></script>
@ -23,5 +23,4 @@
}); });
}); });
</script> </script>
{% endblock additional_js %} {% endblock %} {% endif %}
{% endif %}