feat(seo): add meta tags and page titles
Configure default head meta and title template in nuxt.config.ts Add dynamic SEO meta tags and robots directives to all pages
This commit is contained in:
@@ -52,6 +52,15 @@ const ticketLabel = computed(() => receipt.value.booking.ticketLabel || receipt.
|
||||
const statusColor = computed(() => receipt.value.booking.status === 'confirmed' ? 'success' : 'warning')
|
||||
const sharedSeats = computed(() => receipt.value.seats.filter((seat) => Boolean(seat.sharedAt)))
|
||||
const availableSeats = computed(() => receipt.value.seats.filter((seat) => !seat.sharedAt))
|
||||
|
||||
useSeoMeta({
|
||||
title: () => `${t('receipt.badge')} - ${eventDetails.value.title}`,
|
||||
description: () => `${receipt.value.booking.customerName} · ${ticketLabel.value} · ${receipt.value.booking.seatCount} ${t('common.seats')}`,
|
||||
ogTitle: () => `${t('receipt.badge')} - ${eventDetails.value.title}`,
|
||||
ogDescription: () => `${receipt.value.booking.customerName} · ${ticketLabel.value}`,
|
||||
robots: 'noindex,nofollow'
|
||||
})
|
||||
|
||||
const maxShareCount = computed(() => Math.max(availableSeats.value.length, 1))
|
||||
const normalizedShareCount = computed(() => {
|
||||
return Math.max(1, Math.min(Math.trunc(Number(shareForm.count) || 1), maxShareCount.value))
|
||||
|
||||
Reference in New Issue
Block a user