Skip to content

Commit

Permalink
chore(app): improve defineOgImage usage
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Oct 22, 2024
1 parent 9e571e0 commit 312a64c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 5 additions & 5 deletions app/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
import type { ParsedContent } from '@nuxt/content'
import type { NuxtError } from '#app'
useSeoMeta({
title: 'Page not found',
description: 'We are sorry but this page could not be found.'
})
defineProps({
error: {
type: Object as PropType<NuxtError>,
Expand All @@ -20,6 +15,11 @@ useHead({
}
})
useSeoMeta({
title: 'Page not found',
description: 'We are sorry but this page could not be found.'
})
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
Expand Down
6 changes: 1 addition & 5 deletions app/pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ useSeoMeta({
ogDescription: page.value.description
})
defineOgImage({
component: 'Docs',
title: page.value.title,
description: page.value.description
})
defineOgImageComponent('Docs')
const headline = computed(() => findPageHeadline(page.value))
Expand Down

0 comments on commit 312a64c

Please sign in to comment.