Skip to content

Commit afb6060

Browse files
tony-hommistakes
authored andcommitted
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
1 parent 5c9db09 commit afb6060

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

_includes/contact-list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{% endif %}
1818

1919
<li>
20-
{% if site.plugins contains 'jekyll-feed' %}
20+
{% if site.plugins contains 'jekyll-feed' or site.gems contains 'jekyll-feed' %}
2121
<a href="{{ site.feed.path | default: 'feed.xml' | relative_url }}" title="Atom Feed">
2222
<span class="icon icon--rss">{% include icon-rss.svg %}</span>
2323
<span class="label">{{ site.data.theme.t.subscribe | default: 'Subscribe' }}</span>

_includes/head.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<meta http-equiv="X-UA-Compatible" content="IE=edge">
44
<meta name="viewport" content="width=device-width, initial-scale=1">
55

6-
{% if site.gems contains 'jekyll-seo-tag' %}
6+
{% if site.plugins contains 'jekyll-seo-tag' or site.gems contains 'jekyll-seo-tag' %}
77
{% comment %}
88
Add metadata for search engines and social networks if jekyll-seo-tag plugin is enabled
99
{% endcomment %}
@@ -26,7 +26,7 @@
2626
<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 %}">
2727
{% endif %}
2828

29-
{% if site.gems contains 'jekyll-feed' %}
29+
{% if site.plugins contains 'jekyll-feed' or site.gems contains 'jekyll-feed'%}
3030
{% comment %}
3131
Add Atom feed link if jekyll-feed plugin is enabled
3232
{% endcomment %}

_layouts/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<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>
1414
</header>
1515
<div class="entries">
16-
{% if site.plugins contains 'jekyll-paginate' and page.paginate %}
16+
{% if site.plugins contains 'jekyll-paginate' and page.paginate or site.gems contains 'jekyll-paginate' and page.paginate %}
1717
{% comment %}
1818
Add paginator.posts loop if jekyll-paginate plugin is enabled
1919
and page.paginate == true

0 commit comments

Comments
 (0)