From 9ed2b7180a95eb397f8f47a1ce99461cb7dfd50f Mon Sep 17 00:00:00 2001 From: jluccisano Date: Sun, 12 Feb 2017 17:22:00 +0100 Subject: [PATCH] Rename tag/category archive variables to avoid possible conflicts with site.tags and site.categories - Fixes #329 --- _config.yml | 4 ++-- _includes/category-list.html | 6 +++--- _includes/page__taxonomy.html | 4 ++-- _includes/tag-list.html | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/_config.yml b/_config.yml index bc86fcdb45f7..d3932ea6431b 100644 --- a/_config.yml +++ b/_config.yml @@ -179,10 +179,10 @@ whitelist: # - /tags/my-awesome-tag/index.html ~> path: /tags/ # - path: /categories/ # - path: / -categories: +category_archive: type: liquid path: /categories/ -tags: +tag_archive: type: liquid path: /tags/ # https://github.com/jekyll/jekyll-archives diff --git a/_includes/category-list.html b/_includes/category-list.html index 2347133fb2f3..77b135475faa 100644 --- a/_includes/category-list.html +++ b/_includes/category-list.html @@ -2,14 +2,14 @@ {% include base_path %} -{% case site.categories.type %} +{% case site.category_archive.type %} {% when "liquid" %} {% assign path_type = "#" %} {% when "jekyll-archives" %} {% assign path_type = nil %} {% endcase %} -{% if site.categories.path %} +{% if site.category_archive.path %} {% comment %} @@ -23,7 +23,7 @@ {% for hash in category_hashes %} {% assign keyValue = hash | split: '#' %} {% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} - {% unless forloop.last %}, {% endunless %} + {% unless forloop.last %}, {% endunless %} {% endfor %}

diff --git a/_includes/page__taxonomy.html b/_includes/page__taxonomy.html index 53b5b8053fa3..5a0c39fc0272 100644 --- a/_includes/page__taxonomy.html +++ b/_includes/page__taxonomy.html @@ -1,9 +1,9 @@ {% include base_path %} -{% if site.tags.type and page.tags[0] %} +{% if site.tag_archive.type and page.tags[0] %} {% include tag-list.html %} {% endif %} -{% if site.categories.type and page.categories[0] %} +{% if site.category_archive.type and page.categories[0] %} {% include category-list.html %} {% endif %} \ No newline at end of file diff --git a/_includes/tag-list.html b/_includes/tag-list.html index 96fde1f45326..6e801f25ce82 100644 --- a/_includes/tag-list.html +++ b/_includes/tag-list.html @@ -1,13 +1,13 @@ {% include base_path %} -{% case site.tags.type %} +{% case site.tag_archive.type %} {% when "liquid" %} {% assign path_type = "#" %} {% when "jekyll-archives" %} {% assign path_type = nil %} {% endcase %} -{% if site.tags.path %} +{% if site.tag_archive.path %} {% comment %} @@ -21,7 +21,7 @@ {% for hash in tag_hashes %} {% assign keyValue = hash | split: '#' %} {% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} - {% unless forloop.last %}, {% endunless %} + {% unless forloop.last %}, {% endunless %} {% endfor %}