diff --git a/lib/jekyll-paginate-v2/autopages/utils.rb b/lib/jekyll-paginate-v2/autopages/utils.rb index a69e91f..65ebac4 100644 --- a/lib/jekyll-paginate-v2/autopages/utils.rb +++ b/lib/jekyll-paginate-v2/autopages/utils.rb @@ -60,6 +60,7 @@ def self.index_posts_by(all_posts, index_key) if !index.has_key?(k_split) index[k_split.to_s] = [] end + # TODO: Need to store the original key value here so that I can present it to the users as a page variable they can use (unmodified, e.g. tags not being 'sci-fi' but "Sci-Fi") index[k_split.to_s] << post end end diff --git a/lib/jekyll-paginate-v2/generator/paginationIndexer.rb b/lib/jekyll-paginate-v2/generator/paginationIndexer.rb index 81d4248..dcf39ff 100644 --- a/lib/jekyll-paginate-v2/generator/paginationIndexer.rb +++ b/lib/jekyll-paginate-v2/generator/paginationIndexer.rb @@ -27,11 +27,11 @@ def self.index_posts_by(all_posts, index_key) end for key in post_data - key = key.downcase.strip + key = key.to_s.downcase.strip # If the key is a delimetered list of values # (meaning the user didn't use an array but a string with commas) for k_split in key.split(/;|,/) - k_split = k_split.downcase.strip #Clean whitespace and junk + k_split = k_split.to_s.downcase.strip #Clean whitespace and junk if !index.has_key?(k_split) index[k_split.to_s] = [] end @@ -80,7 +80,7 @@ def self.read_config_value_and_filter_posts(config, config_key, posts, source_po # Now for all filter values for the config key, let's remove all items from the posts that # aren't common for all collections that the user wants to filter on for key in config_value - key = key.downcase.strip + key = key.to_s.downcase.strip posts = PaginationIndexer.intersect_arrays(posts, source_posts[key]) end