瀏覽代碼

Fall back to index if translation for the page doesn't exist (#313)

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
Khosrow Moossavi 5 年之前
父節點
當前提交
8ec09e5d1a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      layouts/partials/header.html

+ 1 - 1
layouts/partials/header.html

@@ -17,7 +17,7 @@
       {{ if .Site.IsMultiLingual }}
         {{ $node := . }}
         {{ .Scratch.Set "separator" true }}
-        {{ range .Translations }}
+        {{ range (default .Site.Home.AllTranslations .Translations) }}
           {{ if ne $.Site.Language .Language }}
             {{ if $node.Scratch.Get "separator" }}
               <li class="navigation-item menu-separator">