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

@ -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 %}

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">
{% if article.prev_article %}
<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 %}
{% set default_locale = OG_LOCALE %}
{% 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 %}
{% set default_locale = OG_LOCALE %}
{% else %}

View file

@ -23,7 +23,7 @@
</form>
{% elif 'pelican.plugins.search' in PLUGINS %}
<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>
{% endif %}

View file

@ -1,13 +1,15 @@
{% 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 %}
<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 %}
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stork/stork.js"></script>
<script>
stork.register("sitesearch", "{{ SITEURL }}/search-index.st", {showProgress: false});
</script>
{% endif %}
{% endif %}