Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better slug transliteration #107

Closed
jpfleury opened this issue Aug 27, 2015 · 2 comments
Closed

Better slug transliteration #107

jpfleury opened this issue Aug 27, 2015 · 2 comments
Assignees

Comments

@jpfleury
Copy link

When creating a new page, the folder name is automatically generated (unless we set it manually) from the page title:

folder = $(this).val().toLowerCase().replace(/\s/g, '-').replace(/[^a-z0-9_\-]/g, '');

[see file pages-all.js]

then the folder name is used (by default) for the slug (see function slug).

The regex is very basic and the result looks sometimes pretty bad. Example with a French title: L'été étoilé => lt-toil. Expected result is l-ete-etoile. The jQuery plugin Slugify gives this result.

@dimayakovlev
Copy link
Contributor

Yes, transliteration needs improvement. Cyrillic characters from page title must be transliterated.

@rhukster
Copy link
Member

Ok added. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants