FGRibreau / FGRibreau/node-unidecode
Option to customise or add mappings?
- Ngôn ngữ chính
- JavaScript
- Star
- 151
- Fork
- 24
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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).
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng việc xem xét API công khai hiện tại và phần triển khai mapping của node-unidecode, sau đó so sánh các nhu cầu slugification đã nêu của Ghost với node-slug. Phạm vi chỉ được xem là hoàn tất khi một thiết kế đã được quyết định hỗ trợ mapping do người dùng cấu hình và các tùy chọn kiểm soát nhóm ký tự, đồng thời mọi phương án tách thành các npm-module đều được giải quyết rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- api, tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100