Get Front-Matter Content #1066
-
Hi all, I've started tinkering with the new v2 version for Nuxt 3, and it's working fantastic, but I'm wondering how I can fetch additional blog content (from my markdown files). const { data: navigation } = await useAsyncData('navigation', () => {
return fetchContentNavigation()
}) This returns the Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I've not yet tried Nuxt Content v2 deeply, but here are some information for you based on my source code reading. First, Nuxt Content v2 seems to have Lines 138 to 145 in bc67b77 content/src/runtime/server/navigation.ts Lines 9 to 29 in bc67b77 Second, it also seems that you can pass content/src/runtime/composables/navigation.ts Lines 6 to 24 in bc67b77 Third, although I'm not sure, you might be able to extend interface content/src/runtime/types.d.ts Lines 193 to 201 in bc67b77 |
Beta Was this translation helpful? Give feedback.
-
Oh, I should have been more precise. The |
Beta Was this translation helpful? Give feedback.
@heychazza
I've not yet tried Nuxt Content v2 deeply, but here are some information for you based on my source code reading.
I hope this helps you somehow.
First, Nuxt Content v2 seems to have
content.navigation.fields
option that let you define what fields of documents to fetch when it creates navigation items to fetch.content/src/module.ts
Lines 138 to 145 in bc67b77
content/src/runtime/server/navigation.ts
Lines 9 to 29 in bc67b77