You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @FGRibreau, this is just a quick question about something for the future. As you know Ghost uses unidecode as the basis for it's slugification code and I was thinking about the future of that feature and what we might do with it.
How would you feel about having options added to node-unidecode, so that it was easy to pass in a set of custom mappings?
I was also wondering about whether it would be possible to group the characters into their logical groups with names, to make it possible to enable/disable conversion of certain chars.
These are just ideas for changes that would help in a couple of things for Ghost, although there may be better solutions. We have been getting requests to not convert certain characters for slugs, as URLS can now contain non-ascii chars. We also get requests to change the mappings, I remember one to do with umlauts in German, and where it did or didn't make sense to transliterate with an additional 'e'. That's a bit vague I know, but the upshot is, it might be nice to, one day in a future provide the ability to add user-configurable mappings in Ghost.
Also, I'm tentatively thinking about splitting this bit of the codebase out into it's own npm module, so that others can use it.
I was taking a look at another module which does slugification, https://github.com/dodo/node-slug, however it doesn't do quite the same things as the Ghost one, and as it has it's own mappings, it's not as complete as ours is being based on unidecode.
How would you feel about having options added to node-unidecode, so that it was easy to pass in a set of custom mappings?
Good idea, I will happily accept a PR for this :)
I was also wondering about whether it would be possible to group the characters into their logical groups with names, to make it possible to enable/disable conversion of certain chars.
Awesome, I can't promise to get to these soon, but it's good to know that we can push some of these ideas down to this module rather than working around it in Ghost 👍
Activity
FGRibreau commentedon Jan 5, 2016
Good idea, I will happily accept a PR for this :)
I would love a suggestion for that :)
ErisDS commentedon Jan 8, 2016
Awesome, I can't promise to get to these soon, but it's good to know that we can push some of these ideas down to this module rather than working around it in Ghost 👍