Skip to content

Commit

Permalink
docs: fix page render function
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Jun 13, 2024
1 parent 74003d3 commit 280fca9
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions docs/pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ const { data: surround } = await useAsyncData(
useSeoMeta({
titleTemplate: '%s - Nuxt Cloudinary',
title: page.value.title,
ogTitle: `${page.value.title} - Nuxt Cloudinary`,
description: page.value.description,
ogDescription: page.value.description,
title: page.value?.title,
ogTitle: `${page.value?.title} - Nuxt Cloudinary`,
description: page.value?.description,
ogDescription: page.value?.description,
})
const headline = computed(() => findPageHeadline(page.value))
const headline = computed(() =>
page?.value ? findPageHeadline(page.value) : 'Nuxt Cloudinary Headline',
)
const communityLinks = computed(() => [
{
icon: 'i-ph-pen-duotone',
Expand Down Expand Up @@ -70,9 +72,9 @@ const communityLinks = computed(() => [
<template>
<UPage>
<UPageHeader
:title="page.title"
:description="page.description"
:links="page.links"
:title="page?.title"
:description="page?.description"
:links="page?.links"
:headline="headline"
/>
Expand All @@ -81,7 +83,7 @@ const communityLinks = computed(() => [
class="pb-0"
>
<ContentRenderer
v-if="page.body"
v-if="page?.body"
:value="page"
/>
<hr
Expand All @@ -92,7 +94,7 @@ const communityLinks = computed(() => [
</UPageBody>
<template
v-if="page.body?.toc?.links?.length"
v-if="page?.body?.toc?.links?.length"
#right
>
<UDocsToc :links="page.body.toc.links">
Expand Down

0 comments on commit 280fca9

Please sign in to comment.