Actual files not showing with Content v3
I have 2 Markdown files in /content/jobs, and I'm just trying to show them in a list in a page, but I can't figure out how to do this. Everything I've tried has either errored somewhere, or only showed one result, with a title of Jobs and a path of /jobs.
Here's my current code, copied from the docs and slightly modified:
pages/jobs/index.vue
:
/content.config.ts
:
The result of this is attached4 Replies
Hi @Dog. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in your question and the knowledge sources available, it appears that you're using Nuxt Content v3 and experiencing issues with displaying your Markdown files. Let's address this problem step by step.
1. First, it's important to note that the
queryCollectionNavigation
method you're using is not part of the standard Nuxt Content v3 API. The Content Navigation documentation doesn't mention this method. Instead, you should use the queryContent
composable to fetch your content.
2. Here's a modified version of your code that should work with Nuxt Content v3:
3. Regarding your content.config.ts
, while it's correctly defining a collection, Nuxt Content v3 doesn't require this configuration for basic usage. You can remove this file if you're not using any advanced collection features.
4. Make sure your Markdown files in the /content/jobs
directory have the correct front matter. Each file should have at least a title
field, for example:
5. If you're still not seeing your content, try running nuxt clean
to clear the cache, then restart your development server.
6. If the problem persists, you might want to check the Content Directory documentation to ensure your files are in the correct location and format.
If these steps don't resolve your issue, it's possible that there might be a configuration problem elsewhere in your Nuxt application. In that case, you might want to create a minimal reproduction of your issue and seek further assistance from the Nuxt community or support channels.
Content Navigation documentation
Content Directory documentation
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@634054240557596672> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
that's outdated
can it be that you are missing the where clouse ?