fix: meta og seo description

This commit is contained in:
YunYouJun 2025-07-13 23:14:20 +08:00
parent b7706990fd
commit b8098c3837
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ export function useValaxyApp() {
// seo
// todo: get first image url from markdown
const siteUrl = computed(() => fm.value.url || siteConfig.value.url)
const description = computed(() => $tO(fm.value.excerpt) || $tO(fm.value.description) || $tO(siteConfig.value.description))
const description = computed(() => $tO(fm.value.excerpt) || $tO(fm.value.description) || $t(siteConfig.value.description))
useSeoMeta({
description,
@ -47,7 +47,7 @@ export function useValaxyApp() {
definePerson({
name: $t(siteConfig.value.author.name),
url: siteUrl.value,
image: siteConfig.value.author.avatar,
image: $t(siteConfig.value.author.avatar),
sameAs: siteConfig.value.social.map(s => s.link),
}),
defineWebSite({

View File

@ -16,7 +16,7 @@ export function useValaxyHead() {
title: $title,
titleTemplate: (title) => {
const siteTitle = $t(siteConfig.value.title)
return fm.value.titleTemplate || (title ? `${title} - ${siteTitle}` : siteTitle)
return $tO(fm.value.titleTemplate) || (title ? `${title} - ${siteTitle}` : siteTitle)
},
link: [
{
@ -29,7 +29,7 @@ export function useValaxyHead() {
computed(() => {
return {
name: 'description',
content: fm.value.description || siteConfig.value.description,
content: $tO(fm.value.description) || $t(siteConfig.value.description),
}
}),
{