ContentDoc with path does not find content
See original GitHub issueEnvironment
Nuxt CLI v3.0.0-rc.3-27550969.a4a3cff 12:03:02 RootDir: /sandbox 12:03:05 Nuxt project info: 12:03:05
- Operating System:
Linux
- Node Version:
v14.18.1
- Nuxt Version:
3.0.0-rc.3-27550969.a4a3cff
- Package Manager:
yarn@1.22.17
- Builder:
vite
- User Config:
modules
- Runtime Modules:
@nuxt/content@2.0.0
,@nuxt/ui@0.1.1-27555426.2ead323
- Build Modules:
-
Reproduction
https://codesandbox.io/s/nuxt3-contentv2-blog-demo-zokde1
Describe the bug
I want to use ContentDoc to query blog posts under content/blog
by specifying path="/blog"
in ContentDoc
component.
If I enter <BASE_URL>/blog/my-article
I always see the fallback code inside the #not-found
slot instead of the index.md
located at that path.
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
ContentDoc - Nuxt Content
The <ContentDoc> component fetches and renders a single document. An explicit path can be passed to the component with the path prop. If...
Read more >Rendering contentDoc component properly according to nuxt ...
<ContentDoc path="/blog/my-firs-blog-post/" />. But it doesn't work also... I am wondering what am i doing wrong. I am using Nuxt content ...
Read more >How to retrieve the file content for a ContentDocument object?
Supposing that you already have the Id of a ContentDocument attached to some record or another, you can get the relevant file content...
Read more >Document owner is not able to see its owned file when ...
Document owner is not able to see its owned file when OwnerId is changed in a single Apex transaction where the ContentDocument is...
Read more >Power your blog with Nuxt Content
You can view the full code with styles here You can see that we're no longer using the <ContentDoc /> component to render...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @Mokkapps 🙂
This PR should resolve the issue: https://github.com/nuxt/content/pull/1143
Thanks for reporting the bug!
The error could also appear if you accidentally place the ‘content’ under another directory 😃 - not the root directory. If you have done it and the fixed it you should clear your cache in order to have it working 😃