New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContentList only showing one document #1141
Comments
Ah excellent! I was just banging my head against this. Good to know I'm not alone 😄 It seems that From my testing if you query a folder full of content (I have been testing with MD files) it will show as empty when using a content query. Adding an There seems to be a prop on I've been reading through the |
From what I see, it seems that it matches I suspect because of the generated query for I think when using Can you open a PR for it @farnabaz or @Tahul? It will be the occasion to add a test case for |
I've resolved this issue in PR #1143 Here you can see in the screenshot when patched this content query and the ContentList is working as expected: I also created a dummy secondary directory with a sub-directory called real-content and you can see that these files are correctly not shown. |
Co-authored-by: Yaël Guilloux <yael.guilloux@gmail.com>
Environment
Linux
v16.15.0
3.0.0-rc.3
npm@8.5.5
vite
modules
,content
@nuxt/content@2.0.0
-
Reproduction
https://github.com/ineation/nuxt-contentlist-issue
In the home page, I have two
ContentList
components:Describe the bug
My understanding of
ContentList
from the default example in the doc, is that it should fetch all the documents that are at the root of a directory but it only fetches the one document specified by thepath
prop (like it does for ContentDoc, which makes sense for ContentDoc but not really for ContentList)Also when we don't use the path prop it does not fetch any single document.
The only way I have found to fetch several documents is to specify
path=""
with an empty string but that does not seems like normal.Additional context
Please note that I am a newbie and that the root cause of the issue might be me :-)
Logs
No response
The text was updated successfully, but these errors were encountered: