You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/de/2024-11-18-how-to-support-multi-language-on-jekyll-blog-with-polyglot.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,17 @@ tags:
11
11
---
12
12
## Einleitung
13
13
Vor etwa 4 Monaten, Anfang Juli 2024, habe ich das [Polyglot](https://github.com/untra/polyglot)-Plugin implementiert, um mehrsprachige Unterstützung für diesen Jekyll-basierten Blog hinzuzufügen, der über Github Pages gehostet wird.
14
-
In diesem Beitrag teile ich die Bugs, die während der Implementierung des Polyglot-Plugins auftraten, deren Lösungsprozess und wie man HTML-Header und sitemap.xml unter Berücksichtigung von SEO erstellt.
14
+
In diesem Beitrag teile ich die Bugs, die während der Anwendung des Polyglot-Plugins auf das Chirpy-Theme auftraten, deren Lösungsprozesse, sowie Methoden zum Schreiben von HTML-Headern und sitemap.xml unter Berücksichtigung der SEO.
15
15
16
16
## Anforderungen
17
-
-[x] Die gebauten Ergebnisse (Webseiten) sollten in sprachspezifischen Pfaden (z.B. `/posts/ko/`{: .filepath}, `/posts/ja/`{: .filepath}) bereitgestellt werden.
18
-
-[x] Um den zusätzlichen Zeit- und Arbeitsaufwand für die mehrsprachige Unterstützung zu minimieren, sollte die Sprache beim Bauen automatisch anhand des lokalen Pfads der originalen Markdown-Datei (z.B. `/_posts/ko/`{: .filepath}, `/_posts/ja/`{: .filepath}) erkannt werden, ohne dass 'lang' und 'permalink' Tags im YAML-Frontmatter der Markdown-Datei manuell angegeben werden müssen.
19
-
-[x] Der Header-Bereich jeder Seite der Website sollte angemessene Content-Language Meta-Tags und hreflang Alternate-Tags enthalten, um die SEO-Richtlinien für die Google-Mehrsprachensuche zu erfüllen.
20
-
-[x] Die `sitemap.xml` sollte Links zu allen mehrsprachigen Seiten der Website ohne Auslassungen bereitstellen, und die `sitemap.xml` selbst sollte nur einmal im Root-Verzeichnis existieren, ohne Duplikate.
21
-
-[ ] Alle Funktionen, die vom [Chirpy-Theme](https://github.com/cotes2020/jekyll-theme-chirpy) bereitgestellt werden, sollten auf jeder Sprachseite normal funktionieren. Falls nicht, müssen sie entsprechend angepasst werden.
17
+
-[x] Die gebauten Ergebnisse (Webseiten) sollten unter sprachspezifischen Pfaden (z.B. `/posts/ko/`{: .filepath}, `/posts/ja/`{: .filepath}) bereitgestellt werden können.
18
+
-[x] Um den zusätzlichen Zeit- und Arbeitsaufwand für die mehrsprachige Unterstützung zu minimieren, sollte es möglich sein, die Sprache automatisch anhand des lokalen Pfads (z.B. `/_posts/ko/`{: .filepath}, `/_posts/ja/`{: .filepath}) zu erkennen, ohne dass 'lang' und 'permalink' Tags im YAML-Frontmatter der originalen Markdown-Dateien manuell spezifiziert werden müssen.
19
+
-[x] Der Header-Bereich jeder Seite der Website sollte angemessene Content-Language Meta-Tags und hreflang Alternate-Tags enthalten, um die SEO-Richtlinien für die mehrsprachige Google-Suche zu erfüllen.
20
+
-[x] Es sollte möglich sein, Links zu allen Seiten, die jede Sprache unterstützen, ohne Auslassungen in der `sitemap.xml` bereitzustellen, und die `sitemap.xml` selbst sollte nur einmal im Root-Verzeichnis ohne Duplikate existieren.
21
+
-[ ] Alle vom [Chirpy-Theme](https://github.com/cotes2020/jekyll-theme-chirpy) bereitgestellten Funktionen sollten auf jeder Sprachseite normal funktionieren, andernfalls sollten sie entsprechend angepasst werden.
22
+
-[x] Normale Funktion von Features wie 'Recently Updated', 'Trending Tags' usw.
23
+
-[x] Keine falsch positiven (False Positive) Warnungen bei der Überprüfung interner Links während des Build-Prozesses mit GitHub Actions
24
+
-[ ] Normale Funktion der Beitragssuche in der oberen rechten Ecke des Blogs
22
25
23
26
## Anwendung des Polyglot-Plugins
24
27
Da Jekyll standardmäßig keine mehrsprachigen Blogs unterstützt, ist ein externes Plugin erforderlich, um einen mehrsprachigen Blog zu implementieren, der die obigen Anforderungen erfüllt. Nach einiger Recherche stellte sich heraus, dass [Polyglot](https://github.com/untra/polyglot) häufig für die Implementierung mehrsprachiger Websites verwendet wird und die meisten der obigen Anforderungen erfüllen kann, daher wurde dieses Plugin ausgewählt.
Copy file name to clipboardExpand all lines: _posts/en/2024-11-18-how-to-support-multi-language-on-jekyll-blog-with-polyglot.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: How to Support Multiple Languages on a Jekyll Blog with Polyglot
2
+
title: How to Support Multiple Languages on Jekyll Blog with Polyglot
3
3
description: >-
4
4
Introducing the process of implementing multilingual support by applying the Polyglot plugin to a Jekyll blog based on 'jekyll-theme-chirpy'.
5
5
categories:
@@ -11,14 +11,17 @@ tags:
11
11
---
12
12
## Introduction
13
13
About 4 months ago, in early July 2024, I added multilingual support to this Jekyll-based blog hosted on Github Pages by applying the [Polyglot](https://github.com/untra/polyglot) plugin.
14
-
In this post, I will share the bugs encountered during the process of applying the Polyglot plugin and their solutions, as well as how to write HTML headers and sitemap.xml considering SEO.
14
+
In this post, I'll share the bugs encountered while applying the Polyglot plugin to the Chirpy theme, their resolution process, and how to write HTML headers and sitemap.xml considering SEO.
15
15
16
16
## Requirements
17
-
-[x] The build result (web pages) should be provided in language-specific paths (e.g., `/posts/ko/`{: .filepath}, `/posts/ja/`{: .filepath}).
18
-
-[x] To minimize the additional time and effort required for multilingual support, the language should be automatically recognized based on the local path (e.g., `/_posts/ko/`{: .filepath}, `/_posts/ja/`{: .filepath}) where the original markdown file is located during the build process, without having to specify 'lang' and 'permalink' tags in the YAML front matter of each markdown file.
17
+
-[x] The built result (web pages) should be provided in language-specific paths (e.g., `/posts/ko/`{: .filepath}, `/posts/ja/`{: .filepath}).
18
+
-[x] To minimize the additional time and effort required for multilingual support, the language should be automatically recognized based on the local path (e.g., `/_posts/ko/`{: .filepath}, `/_posts/ja/`{: .filepath}) where the original markdown file is located during build, without having to specify 'lang' and 'permalink' tags in the YAML front matter of each file.
19
19
-[x] The header part of each page on the site should include appropriate Content-Language meta tags and hreflang alternate tags to meet Google's multilingual search SEO guidelines.
20
20
-[x] All page links supporting each language on the site should be provided in `sitemap.xml` without omission, and `sitemap.xml` itself should exist only once in the root path without duplication.
21
21
-[ ] All functions provided by the [Chirpy theme](https://github.com/cotes2020/jekyll-theme-chirpy) should work normally on each language page, and if not, they should be modified to work properly.
22
+
-[x] Normal operation of features such as 'Recently Updated', 'Trending Tags', etc.
23
+
-[x] No false positive warnings during internal link error verification in the build process using GitHub Actions
24
+
-[ ] Normal operation of the post search function in the upper right corner of the blog
22
25
23
26
## Applying the Polyglot Plugin
24
27
Since Jekyll does not natively support multilingual blogs, an external plugin must be used to implement a multilingual blog that meets the above requirements. After searching, I found that [Polyglot](https://github.com/untra/polyglot) is widely used for multilingual website implementation and can satisfy most of the above requirements, so I adopted this plugin.
Copy file name to clipboardExpand all lines: _posts/es/2024-11-18-how-to-support-multi-language-on-jekyll-blog-with-polyglot.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Cómo implementar soporte multilingüe en un blog Jekyll con Polyglot
3
3
description: >-
4
-
Se presenta el proceso de implementación de soporte multilingüe utilizando el plugin Polyglot en un blog Jekyll basado en 'jekyll-theme-chirpy'.
4
+
Se presenta el proceso de implementación del soporte multilingüe utilizando el plugin Polyglot en un blog Jekyll basado en 'jekyll-theme-chirpy'.
5
5
categories:
6
6
- Blogging
7
7
tags:
@@ -10,15 +10,18 @@ tags:
10
10
- RegExp
11
11
---
12
12
## Introducción
13
-
Hace aproximadamente 4 meses, a principios de julio de 2024, implementé el soporte multilingüe en este blog basado en Jekyll y alojado a través de Github Pages aplicando el plugin [Polyglot](https://github.com/untra/polyglot).
14
-
En este artículo, compartiré los errores que surgieron durante el proceso de aplicación del plugin Polyglot, cómo los resolví, y cómo escribir el encabezado html y sitemap.xml considerando el SEO.
13
+
Hace aproximadamente 4 meses, a principios de julio de 2024, implementé el soporte multilingüe en este blog basado en Jekyll y alojado a través de Github Pages, aplicando el plugin [Polyglot](https://github.com/untra/polyglot).
14
+
En este artículo, compartiré los errores que surgieron durante el proceso de aplicación del plugin Polyglot al tema Chirpy, cómo los resolví, y cómo escribir el encabezado html y el sitemap.xml considerando el SEO.
15
15
16
16
## Requisitos
17
17
-[x] Debe ser posible proporcionar el resultado de la compilación (páginas web) separado por rutas de idioma (ej. `/posts/ko/`{: .filepath}, `/posts/ja/`{: .filepath}).
18
-
-[x] Para minimizar el tiempo y esfuerzo adicionales requeridos para el soporte multilingüe, debe ser posible reconocer automáticamente el idioma según la ruta local donde se encuentra el archivo (ej. `/_posts/ko/`{: .filepath}, `/_posts/ja/`{: .filepath}) durante la compilación, sin tener que especificar manualmente las etiquetas 'lang' y 'permalink' en el YAML front matter del archivo markdown original.
18
+
-[x] Para minimizar el tiempo y esfuerzo adicionales necesarios para el soporte multilingüe, debe ser posible reconocer automáticamente el idioma según la ruta local donde se encuentra el archivo markdown original (ej. `/_posts/ko/`{: .filepath}, `/_posts/ja/`{: .filepath}) durante la compilación, sin tener que especificar manualmente las etiquetas 'lang' y 'permalink' en el YAML front matter de cada archivo.
19
19
-[x] El encabezado de cada página del sitio debe incluir las etiquetas meta Content-Language y hreflang alternativas apropiadas para cumplir con las pautas de SEO para la búsqueda multilingüe de Google.
20
-
-[x] Debe ser posible proporcionar enlaces a todas las páginas que admiten cada idioma en el sitio sin omisiones en `sitemap.xml`, y el propio `sitemap.xml` debe existir solo uno en la ruta raíz sin duplicados.
21
-
-[ ] Todas las funciones proporcionadas por el [tema Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy) deben funcionar normalmente en cada página de idioma, y si no es así, deben modificarse para que funcionen correctamente.
20
+
-[x] Debe ser posible proporcionar todos los enlaces de las páginas que soportan cada idioma en el sitio sin omisiones en `sitemap.xml`, y el propio `sitemap.xml` debe existir solo uno en la ruta raíz sin duplicados.
21
+
-[ ] Todas las funciones proporcionadas por el [tema Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy) deben funcionar correctamente en cada página de idioma, y si no es así, deben modificarse para que funcionen correctamente.
22
+
-[x] Funcionamiento correcto de características como 'Recently Updated', 'Trending Tags', etc.
23
+
-[x] No se producirán advertencias de falsos positivos durante la verificación de errores de enlaces internos en el proceso de compilación utilizando GitHub Actions
24
+
-[ ] Funcionamiento correcto de la función de búsqueda de publicaciones en la esquina superior derecha del blog
22
25
23
26
## Aplicación del plugin Polyglot
24
27
Como Jekyll no admite blogs multilingües de forma nativa, se debe utilizar un plugin externo para implementar un blog multilingüe que cumpla con los requisitos anteriores. Después de buscar, encontré que [Polyglot](https://github.com/untra/polyglot) se usa ampliamente para implementar sitios web multilingües y puede satisfacer la mayoría de los requisitos anteriores, por lo que adopté este plugin.
Copy file name to clipboardExpand all lines: _posts/fr/2024-11-18-how-to-support-multi-language-on-jekyll-blog-with-polyglot.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,18 @@ tags:
10
10
- RegExp
11
11
---
12
12
## Introduction
13
-
Il y a environ 4 mois, début juillet 2024, j'ai ajouté la prise en charge multilingue à ce blog hébergé via GitHub Pages basé sur Jekyll en appliquant le plugin [Polyglot](https://github.com/untra/polyglot).
14
-
Dans cet article, je partage les bugs rencontrés lors de l'application du plugin Polyglot, leur processus de résolution, ainsi que la méthode pour écrire l'en-tête html et le sitemap.xml en tenant compte du SEO.
13
+
Il y a environ 4 mois, début juillet 2024, j'ai ajouté la prise en charge multilingue à ce blog, hébergé via Github Pages et basé sur Jekyll, en appliquant le plugin [Polyglot](https://github.com/untra/polyglot).
14
+
Dans cet article, je partage les bugs rencontrés lors de l'application du plugin Polyglot au thème Chirpy et leur processus de résolution, ainsi que la méthode de rédaction de l'en-tête html et du sitemap.xml en tenant compte du SEO.
15
15
16
16
## Exigences
17
17
-[x] Le résultat de la construction (pages web) doit pouvoir être fourni en distinguant les chemins par langue (ex. `/posts/ko/`{: .filepath}, `/posts/ja/`{: .filepath}).
18
-
-[x]Afin de minimiser le temps et les efforts supplémentaires nécessaires pour la prise en charge multilingue, la langue doit pouvoir être automatiquement reconnue lors de la construction en fonction du chemin local où se trouve le fichier original Markdown (ex. `/_posts/ko/`{: .filepath}, `/_posts/ja/`{: .filepath}), sans avoir à spécifier manuellement les balises 'lang' et 'permalink' dans le YAML front matter du fichier Markdown écrit.
19
-
-[x]L'en-tête de chaque page du site doit inclure les balises méta Content-Language et hreflang alternatives appropriées pour répondre aux directives SEO de Google pour la recherche multilingue.
18
+
-[x]Pour minimiser le temps et les efforts supplémentaires nécessaires à la prise en charge multilingue, la langue doit pouvoir être automatiquement reconnue lors de la construction en fonction du chemin local où se trouve le fichier markdown original (ex. `/_posts/ko/`{: .filepath}, `/_posts/ja/`{: .filepath}), sans avoir à spécifier manuellement les balises 'lang' et 'permalink' dans le YAML front matter du fichier original.
19
+
-[x]La partie en-tête de chaque page du site doit inclure des balises méta Content-Language appropriées et des balises alternatives hreflang pour répondre aux directives SEO pour la recherche multilingue de Google.
20
20
-[x] Tous les liens des pages prenant en charge chaque langue sur le site doivent pouvoir être fournis sans omission dans `sitemap.xml`, et `sitemap.xml` lui-même ne doit exister qu'une seule fois dans le chemin racine sans duplication.
21
-
-[ ] Toutes les fonctionnalités fournies par le [thème Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy) doivent fonctionner normalement sur chaque page de langue, et si ce n'est pas le cas, elles doivent être modifiées pour fonctionner normalement.
21
+
-[ ] Toutes les fonctionnalités fournies par le [thème Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy) doivent fonctionner normalement sur chaque page de langue, et si ce n'est pas le cas, elles doivent être modifiées pour fonctionner correctement.
22
+
-[x] Fonctionnement normal des fonctionnalités telles que 'Recently Updated', 'Trending Tags', etc.
23
+
-[x] Pas de faux positifs (False Positive) lors de la vérification des erreurs de liens internes du site pendant le processus de construction utilisant GitHub Actions
24
+
-[ ] Fonctionnement normal de la fonction de recherche de posts en haut à droite du blog
22
25
23
26
## Application du plugin Polyglot
24
27
Comme Jekyll ne prend pas en charge nativement les blogs multilingues, il faut utiliser un plugin externe pour implémenter un blog multilingue répondant aux exigences ci-dessus. Après recherche, j'ai constaté que [Polyglot](https://github.com/untra/polyglot) est largement utilisé pour implémenter des sites web multilingues et peut satisfaire la plupart des exigences ci-dessus, j'ai donc choisi ce plugin.
-[x]多言語サポートに追加的に必要な時間と労力を可能な限り最小化するために、作成した原本のマークダウンファイルのYAML front matterに'lang'および'permalink'タグを一々指定しなくても、ビルド時に該当ファイルが位置するローカルパス(例:`/_posts/ko/`{: .filepath}、`/_posts/ja/`{: .filepath})に応じて自動的に言語を認識できること。
-[x]多言語サポートに追加的に必要な時間と労力を可能な限り最小化するため、作成したオリジナルのマークダウンファイルのYAML front matterに'lang'および'permalink'タグを一つ一つ指定しなくても、ビルド時にそのファイルが位置するローカルパス(例:`/_posts/ko/`{: .filepath}、`/_posts/ja/`{: .filepath})に応じて自動的に言語を認識できること。
0 commit comments