content icon indicating copy to clipboard operation
content copied to clipboard

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

Open acrolink opened this issue 1 year ago • 1 comments

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

acrolink avatar Feb 07 '24 17:02 acrolink

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.

nobkd avatar Feb 07 '24 21:02 nobkd

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.

github-actions[bot] avatar Jul 18 '24 14:07 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity.

github-actions[bot] avatar Aug 18 '24 01:08 github-actions[bot]