path parts with utf-8 not working - returning "Document not found"
Environment
Nuxt project info: 7:07:34 PM
- Operating System: Linux
- Node Version: v20.11.0
- Nuxt Version: 3.10.1
- CLI Version: 3.10.0
- Nitro Version: 2.8.1
- Package Manager: [email protected]
- Builder: -
- User Config: devtools, modules, css, plugins, build, app
- Runtime Modules: @nuxtjs/[email protected], @nuxtjs/[email protected], @nuxt/[email protected]
- Build Modules: -
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
You can try setting _path key with your real file path to override slugify changing your path.
See related comments:
- https://github.com/nuxt/content/issues/1383#issuecomment-1196237686
- https://github.com/nuxt/content/discussions/2486#discussioncomment-8003935
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.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.