Closed sabelapaulo closed 2 years ago
There is an ongoing discussion about changing this behavior: https://github.com/11ty/eleventy/issues/278
Tags are case sensitive by default, and using the slug
or slugify
filters are what you want to convert the tag strings into URL friendly permalink values.
slugify
: https://www.11ty.dev/docs/filters/slugify/
Some discussion about tag normalization is happening at https://github.com/11ty/eleventy/issues/2462 if you’d like to follow along further!
Let's say I've some front matter like this:
tags:
Capital
Now what I'm hoping for is http://example.com/tags/tag-with-spaces and http://example.com/tags/capital. In other words the spaces get converted to hyphens and the capital letters get converted to lowercase.
But instead I get http://example.com/tags/tag%20with%20spaces and http://example.com/Capital
The result is as desired however with the title being set to title: Tagged “{{ tag }}” in the frontmatter. I want to keep the spaces and and capital letters in the title but NOT in the permalink. Is there any way to do this?