FGRibreau / FGRibreau/node-unidecode

Option to customise or add mappings?

Ouverte
#13 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
JavaScript
Étoiles
151
Forks
24
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.
##

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29612437-option-to-customise-or-add-mappings?utm_campaign=plugin&utm_content=tracker%2F294213&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F294213&utm_medium=issues&utm_source=github).

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par examiner l’API publique actuelle et l’implémentation des mappings de node-unidecode, puis comparez les besoins de slugification indiqués par Ghost avec node-slug. Le périmètre ne sera complet que lorsqu’une conception arrêtée prendra en charge les mappings configurables par l’utilisateur et le contrôle des groupes de caractères, et que toute séparation en modules npm aura été explicitement tranchée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
api, tooling
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.