Skip to content

Commit 8753cbd

Browse files
committed
Support all tags
Instead of allowing only a subset of tag names, `slugify` the tag name so that the URL is always valid. This is the same thing done on "jekyll-archives": - https://github.com/jekyll/jekyll-archives/blob/master/lib/jekyll-archives/archive.rb#L132
1 parent a58064c commit 8753cbd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/jekyll-feed/generator.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,9 @@ def generate_feed_by_tag
8989

9090
def generate_tag_feed(tags_pool, tags_path)
9191
tags_pool.each do |tag|
92-
# allow only tags with basic alphanumeric characters and underscore to keep
93-
# feed path simple.
94-
next if %r![^a-zA-Z0-9_]!.match?(tag)
95-
92+
tag_slug = Jekyll::Utils.slugify(tag)
9693
Jekyll.logger.info "Jekyll Feed:", "Generating feed for posts tagged #{tag}"
97-
path = "#{tags_path}#{tag}.xml"
94+
path = "#{tags_path}#{tag_slug}.xml"
9895
next if file_exists?(path)
9996

10097
@site.pages << make_page(path, :tags => tag)

0 commit comments

Comments
 (0)