How to avoid fetching files located in subdirectories ? (option deep: false
in v1)
#1777
-
Hey there 👋 Does anyone know if there is a way to avoid fetching files located in subdirectories when querying with nuxt/content ? Let's say I have the following structure in the
If my query in
I'll get However this Is there a way not to fetch files in subdirectories ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can achieve your goal using RegExp matching. const { data: articles } = await useAsyncData(() => {
return queryContent().where({ _path: /^\/blog\/[^/]*$/ }).find()
}) |
Beta Was this translation helpful? Give feedback.
You can achieve your goal using RegExp matching.