Merge pull request #248 from saagit/none_plugins
Fix compatibility with Pelican 4.5.0 when PLUGINS is not set
This commit is contained in:
commit
e7a0009a1d
5 changed files with 7 additions and 7 deletions
|
@ -30,7 +30,7 @@
|
||||||
when=article.locale_date,
|
when=article.locale_date,
|
||||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||||
|
|
||||||
{% if 'post_stats' in PLUGINS %}
|
{% if PLUGINS and 'post_stats' in PLUGINS %}
|
||||||
• {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }}
|
• {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE|default('github') }}.min.css">
|
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE|default('github') }}.min.css">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if 'tipue_search' in PLUGINS %}
|
{% if PLUGINS and 'tipue_search' in PLUGINS %}
|
||||||
<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.min.js"></script>
|
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script>
|
||||||
|
@ -156,7 +156,7 @@
|
||||||
|
|
||||||
{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}
|
{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}
|
||||||
|
|
||||||
{% if 'tipue_search' in PLUGINS %}
|
{% if PLUGINS and 'tipue_search' in PLUGINS %}
|
||||||
<form class="navbar-search" action="/search.html" role="search">
|
<form class="navbar-search" action="/search.html" role="search">
|
||||||
<input type="text" name="q" id="tipue_search_input" placeholder="{{ _('Search...') }}">
|
<input type="text" name="q" id="tipue_search_input" placeholder="{{ _('Search...') }}">
|
||||||
</form>
|
</form>
|
||||||
|
@ -280,7 +280,7 @@
|
||||||
{% include 'partial/github.html' %}
|
{% include 'partial/github.html' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if 'tipue_search' in PLUGINS %}
|
{% if PLUGINS and 'tipue_search' in PLUGINS %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#tipue_search_input').tipuesearch();
|
$('#tipue_search_input').tipuesearch();
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if 'post_stats' in PLUGINS %}
|
{% if PLUGINS and 'post_stats' in PLUGINS %}
|
||||||
• {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }}
|
• {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% if 'neighbors' in PLUGINS %}
|
{% if PLUGINS and '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 }}">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% if 'tipue_search' in PLUGINS %}
|
{% if PLUGINS and 'tipue_search' in PLUGINS %}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
|
{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
Loading…
Reference in a new issue