Skip to content

Commit 5ff65e3

Browse files
ryo-manbaclaude
andcommitted
fix: use Japanese OGP description for /ja/ pages
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 343538d commit 5ff65e3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

docs/src/layouts/Layout.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ interface Props {
55
lang?: string;
66
}
77
8-
const defaultDesc = 'Convert HTML tables into SVG charts. No JavaScript to write. Under 7KB.';
9-
const { title, description = defaultDesc, lang = 'en' } = Astro.props;
8+
const isJa = Astro.url.pathname.startsWith('/data-chart/ja/') || Astro.url.pathname.startsWith('/ja/');
9+
const defaultDesc = isJa
10+
? 'HTMLテーブルをSVGチャートに変換。JavaScriptを書く必要なし。7KB未満。'
11+
: 'Convert HTML tables into SVG charts. No JavaScript to write. Under 7KB.';
12+
const { title, description = defaultDesc, lang = isJa ? 'ja' : 'en' } = Astro.props;
1013
const canonicalURL = Astro.site ? new URL(Astro.url.pathname, Astro.site) : Astro.url;
1114
---
1215

0 commit comments

Comments
 (0)