Replies: 1 comment
-
|
I would use the For Example: <script setup lang="ts">
const route = useRoute()
const { data: page } = await useAsyncData(route.path, () => {
return queryCollection("content").path(route.path).first()
})
useSeoMeta({
title: page.value?.seo?.title ?? page.value?.title,
description: page.value?.seo?.description ?? page.value?.description,
ogTitle: page.value?.seo?.title ?? page.value?.title,
ogDescription: page.value?.seo?.description ?? page.value?.description,
})
</script>If your frontmatter only has useSeoMeta({
title: page.value?.title,
description: page.value?.description
})But if you start adding SEO-specific frontmatter, such as a different search/social title, then keeping it under |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The docs dont have many words about SEO, only thing I found was on installation page:
But I noticed that page types have a specific seo object, from the docs:
So I am wondering if one should do instead:
The examples / ui templates, e.g. portfolio, do:
And what would be the benefit of the two options. And should one then in md files declare title + description, seo object or both?
In any case, the docs may add a bit more informations about the seo topic imo :)
Beta Was this translation helpful? Give feedback.
All reactions