content icon indicating copy to clipboard operation
content copied to clipboard

Chinese path does not support!

Open laoergege opened this issue 3 years ago • 3 comments

Environment

Nuxi 3.0.0 00:45:27 00:45:29 RootDir: /home/projects/github-s2s696 00:45:29 Nuxt project info: 00:45:29


  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: modules
  • Runtime Modules: @nuxt/[email protected]
  • Build Modules: -

Reproduction

The Demo

Describe the bug

In the generated content-index.json file, the key is missing the Chinese path:

{
    "/hello":"content:Hello-你好.md"
}

Additional context

No response

Logs

No response

laoergege avatar Dec 05 '22 16:12 laoergege

See https://github.com/nuxt/content/issues/1383#issuecomment-1196237686 for context

nobkd avatar Dec 05 '22 17:12 nobkd

slugify does cause this problem, I have encountered this problem many times in different code, I have often used md5 instead of slugify processing, although it loses a certain readability. Maybe the method of processing the title can be exposed, allowing users to choose how to handle the title.

oeyoews avatar Feb 28 '24 09:02 oeyoews

slugify does cause this problem, I have encountered this problem many times in different code, I have often used md5 instead of slugify processing, although it loses a certain readability. Maybe the method of processing the title can be exposed, allowing users to choose how to handle the title.

Sure, I also used hash to solve this problem.

laoergege avatar Mar 02 '24 13:03 laoergege