Nuxt Content Directory indexing too much?
According to https://content.nuxt.com/usage/content-directory the way to organise the content directories follows this example:
content/index.md /
content/blog/index.md /blog
content/blog/hello.md /blog/hello
I'm trying to use a <ContentList> to list the articles in my blog, however "{page} useContent()" also includes the index.md which I'm not interested. I've tested moving the index out of the folder to its parent, and renaming it again to the folder name, but then, useContent() doesn't recognize it as the blog folder, and ends up listing the root index and blog index files.
Am I just approaching this the wrong way? Should I just add a meta tag and filter the useContent() to just load "posts" for example?
Nuxt Content
Content Directory - Nuxt Content
The Content module parses .md and .yaml files inside the content/ directory and provides paths according to the directory structure.
1 Reply
To those interested, what I ended up doing is something similar to this (I also had to do this for prev/next pages, you just have to adapt to it ignore pages where _stem ends in index)