From 45f3a7a8eef78538518e8aa8bab2c2ec7ca912e9 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Sun, 29 May 2016 21:12:24 -0400 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 bc86fcdb..d3932ea6 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 2347133f..77b13547 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 53b5b805..5a0c39fc 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 96fde1f4..6e801f25 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 %}