mirror of https://github.com/YunYouJun/valaxy
fix: meta og seo description
This commit is contained in:
parent
b7706990fd
commit
b8098c3837
|
@ -26,7 +26,7 @@ export function useValaxyApp() {
|
||||||
// seo
|
// seo
|
||||||
// todo: get first image url from markdown
|
// todo: get first image url from markdown
|
||||||
const siteUrl = computed(() => fm.value.url || siteConfig.value.url)
|
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({
|
useSeoMeta({
|
||||||
description,
|
description,
|
||||||
|
@ -47,7 +47,7 @@ export function useValaxyApp() {
|
||||||
definePerson({
|
definePerson({
|
||||||
name: $t(siteConfig.value.author.name),
|
name: $t(siteConfig.value.author.name),
|
||||||
url: siteUrl.value,
|
url: siteUrl.value,
|
||||||
image: siteConfig.value.author.avatar,
|
image: $t(siteConfig.value.author.avatar),
|
||||||
sameAs: siteConfig.value.social.map(s => s.link),
|
sameAs: siteConfig.value.social.map(s => s.link),
|
||||||
}),
|
}),
|
||||||
defineWebSite({
|
defineWebSite({
|
||||||
|
|
|
@ -16,7 +16,7 @@ export function useValaxyHead() {
|
||||||
title: $title,
|
title: $title,
|
||||||
titleTemplate: (title) => {
|
titleTemplate: (title) => {
|
||||||
const siteTitle = $t(siteConfig.value.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: [
|
link: [
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ export function useValaxyHead() {
|
||||||
computed(() => {
|
computed(() => {
|
||||||
return {
|
return {
|
||||||
name: 'description',
|
name: 'description',
|
||||||
content: fm.value.description || siteConfig.value.description,
|
content: $tO(fm.value.description) || $t(siteConfig.value.description),
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue