How to get navigation meta from queryCollectionNavigation #3191
Unanswered
martijnhalekor
asked this question in
Q&A
Replies: 1 comment
-
Update: I think I was missing Next question: 😄 is it possible to filter on const { data: nav } = await useAsyncData(() =>
queryCollectionNavigation('articles')
);
const navChildren = computed(
() => nav.value?.[0]?.children?.filter((x) => x?.page === false)?.[0],
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been struggling all day trying to implement a category system into Nuxt Content. I really like the power of Nuxt Content, but this is starting to get a little bit frustrating 😅
My directory structure looks like this:

I've added a
.navigation.yml
file as mentioned in the docs.I've also added the yml extension to the source key in
content.config.ts
as mentioned on this issue.:However, the category dirs are not returned in
queryCollectionNavigation('articles')
. I found it's possible to do withqueryCollection('articles')
, but that feels pretty wasteful as I only want to render a list of category links.What's the recommended way to group articles on categories or tags? Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions