mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: AllTranslations
|
||||
description: Returns all translation of the given page, including the given page.
|
||||
description: Returns all translations of the given page, including the current language.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
@@ -63,9 +63,9 @@ And this template:
|
||||
{{ with .AllTranslations }}
|
||||
<ul>
|
||||
{{ range . }}
|
||||
{{ $langName := or .Language.LanguageName .Language.Lang }}
|
||||
{{ $langCode := or .Language.LanguageCode .Language.Lang }}
|
||||
<li><a href="{{ .RelPermalink }}" hreflang="{{ $langCode }}">{{ .LinkTitle }} ({{ $langName }})</a></li>
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}" hreflang="{{ .Language.LanguageCode }}">{{ .LinkTitle }} ({{ or .Language.LanguageName .Language.Lang }})</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user