Replies: 1 comment
-
There is a bit of planning needed to see how to best integrate the content module with However, the basic idea can be similar to this to get you started - but you need to tailor it according to your app: <script setup>
const { path } = useRoute()
const { locale } = useI18n()
const { data: documentContent } = await useAsyncData('doc', () => {
// here you query your documents
return queryContent({ _path: `${locale}/customDir/${path}` }).findOne()
})
</script>
<template>
<ContentRenderer v-if="documentContent" :value="documentContent" />
</template> |
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 can't get it to work correctly with the query builder and I believe it could be great to see the "correct" implementation of nuxt-content with nuxt-i18n.
Beta Was this translation helpful? Give feedback.
All reactions