File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 3
3
---
4
4
< link rel ="stylesheet " href ="/assets/css/main.css ">
5
5
6
+ {% assign baseurl = page.permalink | remove_first: "/" | remove_first: page.lang %}
7
+
8
+ {% for lang in site.languages %}
9
+ {% assign localization = "/" | append: lang | append:baseurl %}
10
+ {% assign locale = site.posts | where:"permalink", localization %}
11
+ {% assign localizations = localizations | concat: locale %}
12
+ {% endfor %}
13
+
6
14
< article class ="post ">
7
15
8
16
< header class ="post-header ">
17
+ {% if localizations.size > 0 %}
18
+ < div class ="localization ">
19
+ < a href ="{{ '/en' | append:baseurl }} "> en</ a >
20
+ {% for locale in localizations %}
21
+ | < a href ="{{ locale.url }} "> {{locale.lang}}</ a >
22
+ {% endfor %}
23
+ </ div >
24
+ {% endif %}
9
25
< h1 class ="post-title "> {{ page.title | escape }}</ h1 >
10
26
< p class ="post-meta ">
11
27
< time class ="dt-published " datetime ="{{ page.date | date_to_xmlschema }} ">
You can’t perform that action at this time.
0 commit comments