nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.01k stars 607 forks source link

path parts with utf-8 not working - returning "Document not found" #2548

Open acrolink opened 4 months ago

acrolink commented 4 months ago

Environment

Nuxt project info: 7:07:34 PM


Reproduction

./pages/products/[...slugCategory]/[...slugProduct].vue

./content/products/books/موسوعه.json

Describe the bug

accessing the URL at:

/products/books/موسوعه

returns: Document not found, overwrite this content with #not-found slot in <ContentDoc>.

However if the json file path name is ./content/products/books/my-life.json then the url is working fine when accessing: /products/books/my-life

Additional context

No response

Logs

No response

nobkd commented 4 months ago

You can try setting _path key with your real file path to override slugify changing your path.

See related comments:

I don't know if it works just the same for JSON files, but it's worth the try.


I think, the slugify behavior should be mentioned (better) in the docs, as multiple issues/discussions asked about this already.