We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 343538d commit 5ff65e3Copy full SHA for 5ff65e3
1 file changed
docs/src/layouts/Layout.astro
@@ -5,8 +5,11 @@ interface Props {
5
lang?: string;
6
}
7
8
-const defaultDesc = 'Convert HTML tables into SVG charts. No JavaScript to write. Under 7KB.';
9
-const { title, description = defaultDesc, lang = 'en' } = Astro.props;
+const isJa = Astro.url.pathname.startsWith('/data-chart/ja/') || Astro.url.pathname.startsWith('/ja/');
+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;
13
const canonicalURL = Astro.site ? new URL(Astro.url.pathname, Astro.site) : Astro.url;
14
---
15
0 commit comments