Conversation
Remove sqeeze
Add tests that check for tagless dashes
|
/cc @jekyll/archives |
|
I'll have time to review and address the build failures next week. |
|
This is an interesting one! 😜 If we want to merge tags (i.e. have If we don't want to merge tags, I'm not sure if all-out removing dashes is the way to go... I can imagine cases where the dash would make a difference in terms of meaning (also, removing the dash in this way would change how it's displayed via Thoughts, comments, discussion appreciated! |
|
@alfredxing, I don't think I did a great job explaining the issue that we were having, so let me clarify. Certain tags that differed only by if/when they were dash delimited, Instances where they were merged:
Instances where they were made distinct:
Dash delimiting all the tags isn't an ideal reasons you stated above:
But, this seemed to be the only way I could quickly ensure that the tags weren't inconsistently merged. I'm guessing a better approach would be to make sure that any dash delimited tag is a distinct tag in FWIW we have since avoided this entirely simply by making sure that our tags don't overlap. If fixing this bug is a major hassle, maybe we could add documentation encouraging people to be stricter with their configuration. We are using a gem to manage Jekyll front matter that has helped a lot with this. |
This PR fixes a problem that was causing some tag archives to be non-existent.
What this fixes
Basically, it creates a custom
post_attr_hashmethod that removes dashes from a tag before assigning its value to the hash thatsite.tagsreturns. This way there is only one reference that is a valid url when it has dashes and there is no tag conflict.This is related to #24
Why?
On our site, some dash-delimited tag archives were were inaccessible because they closely resembled tags without dashes in them. For instance, the
user-centered designtag was being confused with theuser centered designtag. If there was one post with each of the above tags, visiting/tags/user-centered-design/would bring up the post that was first in the list ofsite.postsinstead of posts associated with both tags.