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
The problem is when i create new post and leave path blank autogenerated from title
I see problem for slugify for latin language not full support
here is example code in current helper (src/utils/helpers.js)
const slugify = string => {
if (!string) return '';
const a = 'àáäâèéëêìíïîıòóöôùúüûñçşßÿœæŕśńṕẃǵğǹḿǘẍźḧ·/_,:;';
const b = 'aaaaeeeeiiiiioooouuuuncssyoarsnpwggnmuxzh------';
const p = new RegExp(a.split('').join('|'), 'g');
return string
.toString()
.toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(p, c => b.charAt(a.indexOf(c))) // Replace special chars
.replace(/&/g, '-') // Replace & with 'and'
.replace(/[^\w-]+/g, '') // Remove all non-word chars
.replace(/-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
};
Test
console.log(slugify('Trump gây bàn tán vì ngồi bàn họp nhỏ bất thường'));
The result
trump-gay-ban-tan-vi-ngi-ban-hp-nh-bt-thng
This not correct because missing some charatec
So i have create a contribute i hope the team can merge this
New slugify
This issue has been automatically marked as stale because it has not been commented on for at least two months.
The resources of the Jekyll team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.
This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.
The problem is when i create new post and leave path blank autogenerated from title
I see problem for slugify for latin language not full support
here is example code in current helper (src/utils/helpers.js)
Test
The result
This not correct because missing some charatec
So i have create a contribute i hope the team can merge this
New slugify
Test
The result
this correct
here is link for https://github.com/duongkhoangiam/jekyll-admin/blob/master/src/utils/helpers.js#L46-L179
more about slugify https://gist.github.com/codeguy/6684588
The text was updated successfully, but these errors were encountered: