Update `site.gems` references to `site.plugins` (#39)
* Update `site.gems` references to `site.plugins` Fixes checks to determine if jekyll-seo-tag and jekyll-feed are active. Related to #24 * Add `site.gems` checks for backwards compatibility Check both `site.gems` and `site.plugins` when determining if plugins are active. Allows compatibility with Jekyll versions prior to 3.5.0. Related to #24
This commit is contained in:
parent
5c9db097a3
commit
afb6060a25
|
@ -17,7 +17,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
{% if site.plugins contains 'jekyll-feed' %}
|
{% if site.plugins contains 'jekyll-feed' or site.gems contains 'jekyll-feed' %}
|
||||||
<a href="{{ site.feed.path | default: 'feed.xml' | relative_url }}" title="Atom Feed">
|
<a href="{{ site.feed.path | default: 'feed.xml' | relative_url }}" title="Atom Feed">
|
||||||
<span class="icon icon--rss">{% include icon-rss.svg %}</span>
|
<span class="icon icon--rss">{% include icon-rss.svg %}</span>
|
||||||
<span class="label">{{ site.data.theme.t.subscribe | default: 'Subscribe' }}</span>
|
<span class="label">{{ site.data.theme.t.subscribe | default: 'Subscribe' }}</span>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
{% if site.gems contains 'jekyll-seo-tag' %}
|
{% if site.plugins contains 'jekyll-seo-tag' or site.gems contains 'jekyll-seo-tag' %}
|
||||||
{% comment %}
|
{% comment %}
|
||||||
Add metadata for search engines and social networks if jekyll-seo-tag plugin is enabled
|
Add metadata for search engines and social networks if jekyll-seo-tag plugin is enabled
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={% for font in site.data.theme.google_fonts %}{{ font.name | replace: ' ', '+' }}{% if font.weights %}:{% endif %}{{ font.weights | remove: ' ' }}{% if forloop.last != true %}|{% endif %}{% endfor %}">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={% for font in site.data.theme.google_fonts %}{{ font.name | replace: ' ', '+' }}{% if font.weights %}:{% endif %}{{ font.weights | remove: ' ' }}{% if forloop.last != true %}|{% endif %}{% endfor %}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if site.gems contains 'jekyll-feed' %}
|
{% if site.plugins contains 'jekyll-feed' or site.gems contains 'jekyll-feed'%}
|
||||||
{% comment %}
|
{% comment %}
|
||||||
Add Atom feed link if jekyll-feed plugin is enabled
|
Add Atom feed link if jekyll-feed plugin is enabled
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
|
@ -13,7 +13,7 @@ layout: default
|
||||||
<h2>{{ site.data.theme.t.posts | default: 'Posts' }}{% if paginator.page > 1 %}{{ site.data.theme.t.page | default: 'Page' | prepend: ' - ' | append: ' ' }}{{ paginator.page }} {{ site.data.theme.t.of | default: 'of' }} {{ paginator.total_pages }}{% endif %}</h2>
|
<h2>{{ site.data.theme.t.posts | default: 'Posts' }}{% if paginator.page > 1 %}{{ site.data.theme.t.page | default: 'Page' | prepend: ' - ' | append: ' ' }}{{ paginator.page }} {{ site.data.theme.t.of | default: 'of' }} {{ paginator.total_pages }}{% endif %}</h2>
|
||||||
</header>
|
</header>
|
||||||
<div class="entries">
|
<div class="entries">
|
||||||
{% if site.plugins contains 'jekyll-paginate' and page.paginate %}
|
{% if site.plugins contains 'jekyll-paginate' and page.paginate or site.gems contains 'jekyll-paginate' and page.paginate %}
|
||||||
{% comment %}
|
{% comment %}
|
||||||
Add paginator.posts loop if jekyll-paginate plugin is enabled
|
Add paginator.posts loop if jekyll-paginate plugin is enabled
|
||||||
and page.paginate == true
|
and page.paginate == true
|
||||||
|
|
Loading…
Reference in New Issue