show languages for posts #92

This commit is contained in:
Dmitry Kolosov 2021-07-08 23:32:45 +03:00
parent 866556ffb3
commit de6decde38
5 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,16 @@
{{ if .IsTranslated }}
{{ $pageLang := .Page.Lang}}
<ul class="post-translations">
{{ range .AllTranslations }}
{{ if eq .Lang $pageLang }}
<li>
{{ upper .Lang }}
</li>
{{ else }}
<li>
<a href="{{ .Permalink }}">{{ upper .Lang }}</a>
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}