From 52d160f8574e8d0cddcaa46af114eb382fea1644 Mon Sep 17 00:00:00 2001 From: nakamura <71050561+manabu-nakamura@users.noreply.github.com> Date: Thu, 18 Dec 2025 02:51:53 +0900 Subject: [PATCH] fix(i18n): localize the title (#2610) --- _includes/head.html | 12 ++++++++++-- _layouts/default.html | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index a453323b5..3ad52fd9b 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -57,9 +57,17 @@ {%- unless page.layout == 'home' -%} - {{ page.title | append: ' | ' }} + {%- capture title -%} + {%- if page.collection == 'tabs' -%} + {%- assign tab_key = page.title | downcase -%} + {{- site.data.locales[include.lang].tabs[tab_key] -}} + {%- else -%} + {{- page.title -}} + {%- endif -%} + {%- endcapture -%} + {{- title | append: ' | ' -}} {%- endunless -%} - {{ site.title }} + {{- site.title -}} {% include_cached favicons.html %} diff --git a/_layouts/default.html b/_layouts/default.html index f36c6057b..72db34c1e 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -14,7 +14,7 @@ layout: compress - {% include head.html %} + {% include head.html lang=lang %} {% include sidebar.html lang=lang %}