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,
 | 
			
		||||
           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']) }}
 | 
			
		||||
      {% endif %}
 | 
			
		||||
    </p>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -69,7 +69,7 @@
 | 
			
		|||
          href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE|default('github') }}.min.css">
 | 
			
		||||
  {% 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/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 'tipue_search' in PLUGINS %}
 | 
			
		||||
      {% if PLUGINS and 'tipue_search' in PLUGINS %}
 | 
			
		||||
        <form class="navbar-search" action="/search.html" role="search">
 | 
			
		||||
          <input type="text" name="q" id="tipue_search_input" placeholder="{{ _('Search...') }}">
 | 
			
		||||
        </form>
 | 
			
		||||
| 
						 | 
				
			
			@ -280,7 +280,7 @@
 | 
			
		|||
    {% include 'partial/github.html' %}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
 | 
			
		||||
  {% if 'tipue_search' in PLUGINS %}
 | 
			
		||||
  {% if PLUGINS and 'tipue_search' in PLUGINS %}
 | 
			
		||||
    <script>
 | 
			
		||||
      $(document).ready(function() {
 | 
			
		||||
        $('#tipue_search_input').tipuesearch();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,7 +28,7 @@
 | 
			
		|||
          {% endfor %}
 | 
			
		||||
      {% endif %}
 | 
			
		||||
 | 
			
		||||
      {% if 'post_stats' in PLUGINS %}
 | 
			
		||||
      {% if PLUGINS and 'post_stats' in PLUGINS %}
 | 
			
		||||
        • {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }}
 | 
			
		||||
      {% endif %}
 | 
			
		||||
    </p>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
{% if 'neighbors' in PLUGINS %}
 | 
			
		||||
{% if PLUGINS and '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 }}">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
{% if 'tipue_search' in PLUGINS %}
 | 
			
		||||
{% if PLUGINS and 'tipue_search' in PLUGINS %}
 | 
			
		||||
{% extends 'base.html' %}
 | 
			
		||||
{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
 | 
			
		||||
{% block content %}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue