Skip to content

Commit

Permalink
Merge pull request #16 from wedinc/fix/render-doc
Browse files Browse the repository at this point in the history
fix: render doc
  • Loading branch information
yanskun authored Oct 29, 2023
2 parents d11984d + e2dade5 commit 20b1dd2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pages/[slug].vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<template>
<main>
<ContentDoc />
<ContentRenderer v-if="data" :value="data" />
</main>
</template>

<script setup lang="ts">
const route = useRoute()
const { data } = await useAsyncData('get-document', () =>
queryContent(route.path).findOne()
)
const { page } = useContent()
const thumbnail = page.value.image
? `thumbnails/${page.value.image}`
Expand All @@ -22,10 +27,4 @@
]
})
useContentHead(page)
// const route = useRoute()
// const { data } = await useAsyncData('get-document', () =>
// queryContent(route.path).findOne()
// )
// console.log({ data, page })
</script>

0 comments on commit 20b1dd2

Please sign in to comment.