jekyll-feed icon indicating copy to clipboard operation
jekyll-feed copied to clipboard

Support all tags, categories, and collections

Open somini opened this issue 5 years ago • 9 comments

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

There is a possibility that the same tag slugifies to the same string, but it's probably fine.

somini avatar Sep 14 '20 00:09 somini

This is already done on the latest release.

somini avatar Nov 01 '20 20:11 somini

This is already done on the latest release.

My mistake.

somini avatar Nov 01 '20 21:11 somini

Rebased to the latest master.

somini avatar Aug 15 '21 11:08 somini

Rebased to the latest master.

somini avatar Apr 28 '22 11:04 somini

Rebased to the latest "master.

somini avatar Nov 08 '22 00:11 somini

I agree that this is a better approach. It's certainly better than silently dropping tags!

I'm not a maintainer here, so I can't recommend what to do next. But my suggestion would be to add some tests (e.g. tags with spaces, tags with underscores, etc), since I wouldn't be comfortable myself merging a PR without them.

Finally, I think we would also need to consider backwards compatibility. At the moment, the feeds have case-sensitive paths, and the tags can contain underscores, and there will be people who have published their feeds like this already, and those feeds will need to keep working.

tag current slugify
foo foo.xml foo.xml
BAR BAR.xml bar.xml
foo_bar foo_bar.xml foo-bar.xml
foo-baz (no output) foo-baz.xml
with space (no output) with-space.xml

I dislike adding configuration options, but maybe it needs a backwards-compatibility flag?

gravitystorm avatar Jan 20 '24 16:01 gravitystorm

I agree, a configuration option for keeping backwards compatibility and some tests would be nice.

I don't think I have much time to implement this, I'm using my branch in production for years now. If you want to take this, be my guest.

somini avatar Jan 23 '24 23:01 somini