We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally posted by kjanusz August 14, 2022
I have the problem that the representation of data in default slot does not work. I searched issues but found nothing.
Am I doing something wrong? My mistake of thinking?
This works (title is displayed)
<template> <main> <h1>{{ data.title }}</h1> <ContentRenderer :value="data"> <template #empty> <p>No content found.</p> </template> </ContentRenderer> </main> </template> <script setup lang="ts"> const { path } = useRoute(); const { data } = await useAsyncData(`content-${path}`, () => queryContent().where({ _path: path, draft: { $ne: true } }).findOne()) </script>
This does not work (title is not displayed)
<template> <main> <ContentRenderer :value="data"> <h1>{{ data.title }}</h1> <template #empty> <p>No content found.</p> </template> </ContentRenderer> </main> </template> <script setup lang="ts"> const { path } = useRoute(); const { data } = await useAsyncData(`content-${path}`, () => queryContent().where({ _path: path, draft: { $ne: true } }).findOne()) </script>
My configuration
"devDependencies": { "@nuxt/content": "^2.0.1", "nuxt": "3.0.0-rc.8", }
export default defineNuxtConfig({ // static HTML generation (SSG) ssr: true, target: "static", modules: ["@nuxt/content"], content: { // https://content.nuxtjs.org/api/configuration }, });
Bug or Feature?
The text was updated successfully, but these errors were encountered:
<ContentRenderer>
Successfully merging a pull request may close this issue.
Discussed in #1448
Originally posted by kjanusz August 14, 2022
I have the problem that the representation of data in default slot does not work.
I searched issues but found nothing.
Am I doing something wrong? My mistake of thinking?
This works (title is displayed)
This does not work (title is not displayed)
My configuration
Bug or Feature?
The text was updated successfully, but these errors were encountered: