Replies: 7 comments 6 replies
-
Another option might be to convert tags to lowercase for display? |
Beta Was this translation helpful? Give feedback.
-
I've certainly had bugs on my site where i've had duplicate tags as a result of inconsistent captialisation. I don't know if something should force them to one or the other, but it could combine both cases so that either works. |
Beta Was this translation helpful? Give feedback.
-
It would be great if there was a way to normalize tags, but I think it’s also a bit more complex than this. For example, I have a site where I would like these following tags to be “merged” into one tag: - Atlanta, GA
- atlanta ga
- Atlanta, Georgia ...etc. What if there was an API for normalizing tags? I can imagine a hypothetical function like this: eleventyConfig.onCreateTag((tag) => tag.toLowerCase().trim() /* or whatever else you want to do */); Since there’s probably no default configuration that can satisfy everyone, this leaves it in the hands of the user. |
Beta Was this translation helpful? Give feedback.
-
It seems that @johnridesabike's approach would optionally support @nhoizey's desire for sluggification too. Is there an elegant way to make that approach a switchable default? Seems there could be two versions of this, one where that line needs to be explicitly present in |
Beta Was this translation helpful? Give feedback.
-
Also remeber about non-latin characters - the issue relates to this one. Tag transform function is really demanded, otherwise urls become the mess of latin and non latin letters and whitespaces |
Beta Was this translation helpful? Give feedback.
-
I second this as I currently have problems transferring a website with blog to Eleventy from Wordpress because of an inconsistent usage of tags. The company uses camel/dromedary case like
so the ‘original’ tag form is important here:
For permalink
Also, a |
Beta Was this translation helpful? Give feedback.
-
New home base for this is at #2462 and I’ll think we’ll probably land with an opt-in change per this comment #2462 (comment) |
Beta Was this translation helpful? Give feedback.
-
Moving an issue to discussion here per @zachleat's request.
Currently the tags in the base blog are case sensitive, but I suspect that's not what most users would actually want. In a project I've used them for, I have a mix of tags from different human and programmatic sources, and it's not easy to ensure the human-generated ones are all lower cased.
What would people think about a config option to control this, probably defaulting to "case insensitive"?
Beta Was this translation helpful? Give feedback.
All reactions