From 20a56343f72b33810fa73b04760a63b994023d89 Mon Sep 17 00:00:00 2001 From: Ramon de C Valle Date: Thu, 14 Nov 2024 01:05:27 -0800 Subject: [PATCH] Fix category and tag filters --- _plugins/category_filter.rb | 4 ++-- _plugins/tag_filter.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_plugins/category_filter.rb b/_plugins/category_filter.rb index fb49040..a444c21 100644 --- a/_plugins/category_filter.rb +++ b/_plugins/category_filter.rb @@ -3,9 +3,9 @@ module CategoryFilter def category_url(category) site = @context.registers[:site] if site.config["categories_dir"] - "#{site.config["url"]}/#{site.config["baseurl"]}/#{site.config["categories_dir"]}/#{category.tr(" ", "-")}/" + "#{site.config["url"]}/#{site.config["categories_dir"]}/#{category.tr(" ", "-")}/" else - "#{site.config["url"]}/#{site.config["baseurl"]}/categories/#{category.tr(" ", "-")}/" + "#{site.config["url"]}/categories/#{category.tr(" ", "-")}/" end.gsub(/\/\/+/).with_index { |_, i| i.zero? ? "//" : "/" } end end diff --git a/_plugins/tag_filter.rb b/_plugins/tag_filter.rb index c65ef68..dd1900a 100644 --- a/_plugins/tag_filter.rb +++ b/_plugins/tag_filter.rb @@ -3,9 +3,9 @@ module TagFilter def tag_url(tag) site = @context.registers[:site] if site.config["tags_dir"] - "#{site.config["url"]}/#{site.config["baseurl"]}/#{site.config["tags_dir"]}/#{tag.tr(" ", "-")}/" + "#{site.config["url"]}/#{site.config["tags_dir"]}/#{tag.tr(" ", "-")}/" else - "#{site.config["url"]}/#{site.config["baseurl"]}/tags/#{tag.tr(" ", "-")}/" + "#{site.config["url"]}/tags/#{tag.tr(" ", "-")}/" end.gsub(/\/\/+/).with_index { |_, i| i.zero? ? "//" : "/" } end end