Replies: 4 comments 2 replies
-
Hey, I can't say about best practice but I had a solution like this that is still working well for me. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
i am a new to nuxt content3, could you teach me how to update blog in production environment |
Beta Was this translation helpful? Give feedback.
0 replies
-
Same here. Previously I used <template>
<Cemetery v-if="data" :data="data.meta" />
</template>
<script setup>
import Cemetery from '~/components/Cemetery.vue';
const { locale, defaultLocale } = useI18n();
const route = useRoute();
const { data } = await useAsyncData(route.path, () => {
return queryCollection('cemeteries').where('slug', '=', route.path).first()
})
// Below commented out code is not working anymore
// if (!data) {
// throw createError({
// statusCode: 404,
// statusMessage: "Page Not Found",
// });
// }
// const setI18nParams = useSetI18nParams()
// setI18nParams({
// en: { slug: data.localeSlugs.en },
// de: { slug: data.localeSlugs.de }
// })
// useContentHead(data);
</script> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello @farnabaz , I apologize for the intrusion.
Lately, I've noticed many people have questions regarding the integration of @nuxt/content and @nuxtjs/i18n. The official documentation lacks detailed guidance on this matter.
Therefore, I would like to ask if you could assist in writing a best practice guide. Ideally, it could be added to the project's examples directory.
Beta Was this translation helpful? Give feedback.
All reactions