llighter / yunha-ind

YUNHA INDUSTRY website
https://llighter.github.io
MIT License
1 stars 0 forks source link

Bug: slugify can't apply to hangul(한글) #26

Open llighter opened 4 years ago

llighter commented 4 years ago

Describe the bug In 11ty, H tag(#, ##, ###, etc) transform with link.

But, When I use hangul(Korean), this module can't transform to link rather return empty space. So, I need to figure out to apply hangul to slug.

11ty use slugify.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://github.com/simov/slugify'
  2. Clone this repo
  3. Write test with hangul
  4. See error

Expected behavior ex. 테 스 트 -> 테-스-트

llighter commented 4 years ago

Chek this out! https://github.com/11ty/eleventy/issues/278

llighter commented 4 years ago

https://github.com/llighter/yunha-ind/blob/584204cb3dff0b4c7153aa4627747760d68f0bea/.eleventy.js#L49-L74

In .eleventy.js, It contains the logic to handle the link. If I want to use hangul as a permalink, I should edit this setting. ex. replace slugify module to different one like eliminating special charators..

llighter commented 4 years ago

https://github.com/Microsoft/vscode/issues/20626

https://www.npmjs.com/package/markdown-it-named-headers

Processing slugify for non-latin characters in vscode

llighter commented 4 years ago
  1. Edit .eleventy.js to enable non latin characters.
  2. Test if it works
  3. Make npm module for slugify-non-latin
  4. Write about this to article