Skip to content

Commit f2c09c9

Browse files
committed
Enable i18n for "Home" link in site navigation
Integrate "Home" link with the other sitelinks to allow for localization via the `_data/locales/*.yml` files. For `en`: ```yaml sitelinks: - text: Home url: /en home: true ``` The `home` tag is introduced because the "Home" link requires special treatment; it needs the CSS class "home" which controls the link's visibility (it is only displayed in the hamburger menu for mobile view) and ensures proper highlighting when selected. As a side effect of this change the "Home" link is added to the sitelinks in the footer, since the footer also uses `_includes/sitelinks.html`. To keep the appearance of the site unchanged, the footer "Home" link is set to `display: none`.
1 parent a65a78a commit f2c09c9

File tree

19 files changed

+52
-4
lines changed

19 files changed

+52
-4
lines changed

_data/locales/bg.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: най-добрият приятел на програмиста
44

55
sitelinks:
6+
- text: Home
7+
url: /bg
8+
home: true
69
- text: За сваляне
710
url: /bg/downloads
811
- text: Документация

_data/locales/de.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: Der beste Freund eines Programmierers
44

55
sitelinks:
6+
- text: Home
7+
url: /de
8+
home: true
69
- text: Downloads
710
url: /de/downloads
811
- text: Dokumentation

_data/locales/en.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: A Programmer's Best Friend
44

55
sitelinks:
6+
- text: Home
7+
url: /en
8+
home: true
69
- text: Downloads
710
url: /en/downloads
811
- text: Documentation

_data/locales/es.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: El mejor amigo de un desarrollador
44

55
sitelinks:
6+
- text: Home
7+
url: /es
8+
home: true
69
- text: Descargas
710
url: /es/downloads
811
- text: Documentación

_data/locales/fr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: A Programmer's Best Friend
44

55
sitelinks:
6+
- text: Home
7+
url: /fr
8+
home: true
69
- text: Téléchargements
710
url: /fr/downloads
811
- text: Documentation

_data/locales/id.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: Sahabat Terbaik Programmer
44

55
sitelinks:
6+
- text: Home
7+
url: /id
8+
home: true
69
- text: Unduh
710
url: /id/downloads
811
- text: Dokumentasi

_data/locales/it.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: Il migliore amico dei programmatori
44

55
sitelinks:
6+
- text: Home
7+
url: /it
8+
home: true
69
- text: Scarica
710
url: /it/downloads
811
- text: Documentazione

_data/locales/ja.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: A Programmer's Best Friend
44

55
sitelinks:
6+
- text: Home
7+
url: /ja
8+
home: true
69
- text: ダウンロード
710
url: /ja/downloads
811
- text: ドキュメント

_data/locales/ko.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: 루비
33
slogan: 프로그래머의 단짝 친구
44

55
sitelinks:
6+
- text: Home
7+
url: /ko
8+
home: true
69
- text: 다운로드
710
url: /ko/downloads
811
- text: 문서

_data/locales/pl.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ ruby: Ruby
33
slogan: Najlepszy Przyjaciel Programisty
44

55
sitelinks:
6+
- text: Home
7+
url: /pl
8+
home: true
69
- text: Pobierz
710
url: /pl/downloads
811
- text: Dokumentacja

0 commit comments

Comments
 (0)