diff --git a/_config.yml b/_config.yml index 34877ffddc..b7e9fb60ea 100644 --- a/_config.yml +++ b/_config.yml @@ -58,3 +58,6 @@ defaults: collections: topics: output: true + +languages: + - ja \ No newline at end of file diff --git a/_layouts/newsletter.html b/_layouts/newsletter.html index 7d1908658d..8ea14b58dc 100644 --- a/_layouts/newsletter.html +++ b/_layouts/newsletter.html @@ -2,8 +2,23 @@ layout: default --- + +{% assign baseurl = page.permalink | remove_first: "/" | remove_first: page.lang %} + +{% for lang in site.languages %} + {% assign localization = "/" | append: lang | append:baseurl %} + {% assign locale = site.posts | where:"permalink", localization %} + {% assign localizations = localizations | concat: locale %} +{% endfor %} +
+ {% if localizations.size > 0 %} + en + {% for locale in localizations %} + | {{locale.lang}} + {% endfor %} + {% endif %}

{{ page.title | escape }}