From 96baec00943bf55880ed0ffece014725d7bec89c Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 2 Dec 2023 13:49:50 +0900 Subject: [PATCH] Tweak SEO --- app.vue | 2 +- locales/ja-JP.yml | 3 ++- pages/docs/[...slug].vue | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app.vue b/app.vue index 4fb97157..ae62b886 100644 --- a/app.vue +++ b/app.vue @@ -29,7 +29,7 @@ const getDescription = (): string => { return t('_seo.defaultDescription'); } } -const getTitle = () => route.meta.title ? `${route.meta.title} | ${t('_seo.siteName')}` : t('_seo.siteName'); +const getTitle = () => route.meta.title ? `${route.meta.title} | ${t('_seo.siteName')}` : t('_seo.siteNameLong'); const getLdJson = (additionalGraphes: Thing[] = []): string => { const ldJson: Graph = { "@context": "https://schema.org", diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0a678ac0..5c48c43f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -5,8 +5,9 @@ clickToExpand: "(クリックして展開)" _seo: siteName: "Misskey Hub" + siteNameLong: "Misskey Hub – Misskeyプロジェクト 公式サイト" defaultTitleTagline: "ノートでひろがるネットワーク" - defaultDescription: "Misskeyはオープンソースの分散型ソーシャルネットワーキングプラットフォームです。" + defaultDescription: "【ノートでひろがるネットワーク】分散型SNS Misskeyの公式サイト。Misskeyのはじめかたやサーバー一覧など、Misskeyに関する情報が満載!" _nav: servers: "サーバー" diff --git a/pages/docs/[...slug].vue b/pages/docs/[...slug].vue index f1fa02ef..8fcf8648 100644 --- a/pages/docs/[...slug].vue +++ b/pages/docs/[...slug].vue @@ -63,6 +63,9 @@ if (!data.value) { } route.meta.title = data.value?.title; +if (data.value.description) { + route.meta.description = data.value.description; +}