website/layouts/shortcodes/language-repos-list.html

38 lines
924 B
HTML

{{- $languages := .Site.Home.AllTranslations }}
<table>
<thead>
<tr>
<th>
Language
</th>
<th>
Language code
</th>
<th>
Repository
</th>
</tr>
</thead>
<tbody>
{{- range $languages.ByWeight }}
{{- $name := .Language.LanguageName }}
{{- $code := string .Language }}
{{- $repo := printf "https://github.com/%s" (index .Site.Data.repos $code) }}
<tr>
<td>
<a href="{{ .Permalink }}">
{{ $name }}
</a>
</td>
<td>
<code>{{ $code }}</code>
</td>
<td>
<a href="{{ $repo }}">
{{ $repo }}
</a>
</td>
</tr>
{{- end }}
</tbody>
</table>