docs(app): clean seo metas

This commit is contained in:
Benjamin Canac
2025-04-04 23:12:17 +02:00
parent a0c9731f63
commit eeba3b4049
10 changed files with 21 additions and 19 deletions

View File

@@ -67,9 +67,9 @@ if (!import.meta.prerender) {
const type = page.value?.path.includes('components') ? 'Vue Component ' : page.value?.path.includes('composables') ? 'Vue Composable ' : '' const type = page.value?.path.includes('components') ? 'Vue Component ' : page.value?.path.includes('composables') ? 'Vue Composable ' : ''
useSeoMeta({ useSeoMeta({
titleTemplate: `%s ${type}- Nuxt UI ${page.value.module === 'ui-pro' ? 'Pro' : ''} v3${page.value.framework === 'vue' ? ' for Vue' : ''}`, titleTemplate: `%s ${type}- Nuxt UI ${page.value.module === 'ui-pro' ? 'Pro' : ''} ${page.value.framework === 'vue' ? ' for Vue' : ''}`,
title: page.value.navigation?.title ? page.value.navigation.title : page.value.title, title: page.value.navigation?.title ? page.value.navigation.title : page.value.title,
ogTitle: `${page.value.navigation?.title ? page.value.navigation.title : page.value.title} ${type}- Nuxt UI ${page.value.module === 'ui-pro' ? 'Pro' : ''} v3${page.value.framework === 'vue' ? ' for Vue' : ''}`, ogTitle: `${page.value.navigation?.title ? page.value.navigation.title : page.value.title} ${type}- Nuxt UI ${page.value.module === 'ui-pro' ? 'Pro' : ''} ${page.value.framework === 'vue' ? ' for Vue' : ''}`,
description: page.value.description, description: page.value.description,
ogDescription: page.value.description ogDescription: page.value.description
}) })

View File

@@ -7,7 +7,7 @@ const title = 'Vue Components'
const description = 'Explore 99+ customizable UI components for Vue and Nuxt built with Tailwind CSS and Reka UI.' const description = 'Explore 99+ customizable UI components for Vue and Nuxt built with Tailwind CSS and Reka UI.'
useSeoMeta({ useSeoMeta({
titleTemplate: `%s - Nuxt UI`, titleTemplate: '%s - Nuxt UI',
title, title,
description, description,
ogTitle: `${title} - Nuxt UI`, ogTitle: `${title} - Nuxt UI`,

View File

@@ -5,6 +5,7 @@ import { animate } from 'motion-v'
import { joinURL } from 'ufo' import { joinURL } from 'ufo'
const { url } = useSiteConfig() const { url } = useSiteConfig()
useSeoMeta({ useSeoMeta({
title: page.title, title: page.title,
description: page.description, description: page.description,

View File

@@ -12,7 +12,7 @@ const { url } = useSiteConfig()
useSeoMeta({ useSeoMeta({
title, title,
description, description,
ogTitle: `${title} - Nuxt UI Pro`, ogTitle: title,
ogDescription: description, ogDescription: description,
ogImage: joinURL(url, '/pro/og-image.png') ogImage: joinURL(url, '/pro/og-image.png')
}) })

View File

@@ -9,10 +9,10 @@ const { url } = useSiteConfig()
useSeoMeta({ useSeoMeta({
title: page.title, title: page.title,
ogTitle: page.title,
ogImage: joinURL(url, '/pro/og-image.png'),
description: page.description, description: page.description,
ogDescription: page.description ogTitle: page.title,
ogDescription: page.description,
ogImage: joinURL(url, '/pro/og-image.png')
}) })
</script> </script>

View File

@@ -7,8 +7,8 @@ const { url } = useSiteConfig()
useSeoMeta({ useSeoMeta({
title: page.title, title: page.title,
ogTitle: page.title,
description: page.description, description: page.description,
ogTitle: page.title,
ogDescription: page.description, ogDescription: page.description,
ogImage: joinURL(url, '/pro/og-image.png') ogImage: joinURL(url, '/pro/og-image.png')
}) })

View File

@@ -13,7 +13,7 @@ const description = page.value.description
useSeoMeta({ useSeoMeta({
title, title,
description, description,
ogTitle: `${title} - Nuxt UI Pro`, ogTitle: title,
ogDescription: description, ogDescription: description,
ogImage: joinURL(url, '/pro/og-image.png') ogImage: joinURL(url, '/pro/og-image.png')
}) })

View File

@@ -5,8 +5,9 @@ const description = 'Discover our Volta board for @nuxt/ui development status.'
useSeoMeta({ useSeoMeta({
titleTemplate: '%s - Nuxt UI', titleTemplate: '%s - Nuxt UI',
title, title,
ogTitle: 'Nuxt UI Roadmap', description,
description ogTitle: `${title} - Nuxt UI`,
ogDescription: description
}) })
defineOgImageComponent('Docs', { defineOgImageComponent('Docs', {

View File

@@ -1,20 +1,19 @@
<script setup lang="ts"> <script setup lang="ts">
import { joinURL } from 'ufo'
const { data: page } = await useAsyncData('showcase', () => queryCollection('showcase').first()) const { data: page } = await useAsyncData('showcase', () => queryCollection('showcase').first())
if (!page.value) { if (!page.value) {
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true }) throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
} }
const { url } = useSiteConfig()
useSeoMeta({ useSeoMeta({
titleTemplate: `%s - Nuxt UI`, titleTemplate: `%s - Nuxt UI`,
title: page.value.title, title: page.value.title,
description: page.value.description, description: page.value.description,
ogTitle: `${page.value.title} - Nuxt UI`, ogTitle: `${page.value.title} - Nuxt UI`,
ogDescription: page.value.description, ogDescription: page.value.description
ogImage: joinURL(url, '/og-image.png') })
defineOgImageComponent('Docs', {
headline: 'Community'
}) })
</script> </script>

View File

@@ -5,8 +5,9 @@ const description = 'The development of Nuxt UI is led by a community of develop
useSeoMeta({ useSeoMeta({
titleTemplate: '%s - Nuxt UI', titleTemplate: '%s - Nuxt UI',
title, title,
ogTitle: 'Nuxt UI Team', description,
description ogTitle: `${title} - Nuxt UI`,
ogDescription: description
}) })
defineOgImageComponent('Docs', { defineOgImageComponent('Docs', {