Open nhoizey opened 3 months ago
Is your feature request related to a problem? Please describe.
Current slug feature removes single quotes (used as apostrophes) without replacing them with the sanitize_replacement character.
sanitize_replacement
For example I have a French content titled Test d'image.
Test d'image
The slug is computed as test-dimage with this configuration:
test-dimage
slug: encoding: "ascii" clean_accents: true sanitize_replacement: "-"
This is wrong, as “dimage” is not a word.
I believe the slug should be test-d-image.
test-d-image
Describe the solution you'd like
I think single quotes (and maybe other characters) should also be replaced with the sanitize_replacement character.
Describe alternatives you've considered
I could use my own slugify function, if it was possible.
Maybe this PR would allow it (I'm not sure):
In other projects, I use @sindresorhus/slugify.
I even developed an extended version for some non latin characters, this is not a trivial topic: https://github.com/nhoizey/eleventy-plugin-pack11ty/blob/main/_11ty/utils/slugify.js
Is your feature request related to a problem? Please describe.
Current slug feature removes single quotes (used as apostrophes) without replacing them with the
sanitize_replacement
character.For example I have a French content titled
Test d'image
.The slug is computed as
test-dimage
with this configuration:This is wrong, as “dimage” is not a word.
I believe the slug should be
test-d-image
.Describe the solution you'd like
I think single quotes (and maybe other characters) should also be replaced with the
sanitize_replacement
character.Describe alternatives you've considered
I could use my own slugify function, if it was possible.
Maybe this PR would allow it (I'm not sure):
6690
In other projects, I use @sindresorhus/slugify.
I even developed an extended version for some non latin characters, this is not a trivial topic: https://github.com/nhoizey/eleventy-plugin-pack11ty/blob/main/_11ty/utils/slugify.js