jekyll / jekyll-admin

A Jekyll plugin that provides users with a traditional CMS-style graphical interface to author content and administer Jekyll sites.
https://jekyll.github.io/jekyll-admin/
MIT License
2.82k stars 357 forks source link

Update helpers.js #614

Open duongkhoangiam opened 3 years ago

duongkhoangiam commented 3 years ago

Completed create slug from string in Javascript

Fixes #613

mertkahyaoglu commented 3 years ago

@duongkhoangiam Hey, thanks for the pr. Could you explain briefly what this pr solves?

Also, some tests are not passing here. We should fix them and add tests for new cases this pr fixes.

Edit: No worries. I just saw the issue and updated the description.

duongkhoangiam commented 3 years ago

When i using admin to created new post. the filename (path) leave blank to automatic generate is not completed for latin language, i am not sure this fix is solved or not because not sure the process generate file name from ruby or nodejs code. I hope we can add some nicely slugify to generate for latin language

Example when i type title is "Trump gây bàn tán vì ngồi bàn họp nhỏ bất thường" The filename generate is "2020-11-28-trump-gay-ban-tan-vi-ngi-ban-hp-nh-bt-thng.md"

This not correct because removed some characters. the correct is "2020-11-28-trump-gay-ban-tan-vi-ngoi-ban-hop-nho-bat-thuong.md"