aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/languages.html
diff options
context:
space:
mode:
authorAlex Ivanov <ai@contributor.pw>2021-01-21 13:42:26 +0300
committerGitHub <noreply@github.com>2021-01-21 11:42:26 +0100
commitc828c6660f32da34e118fad039bc01602ba0251a (patch)
treeada8804a3546b21cc9c082511ee52eceaec6dbd1 /layouts/partials/docs/languages.html
parente53a638b2c814c99c8582a6bdda643e6cc268280 (diff)
Add OnlyTranslated property (#303)
* Add OnlyTranslated property Signed-off-by: Alex Ivanov <ai@contributor.pw> * Add newlines Signed-off-by: Alex Ivanov <ai@contributor.pw> * rename property Signed-off-by: Alex Ivanov <ai@contributor.pw>
Diffstat (limited to 'layouts/partials/docs/languages.html')
-rw-r--r--layouts/partials/docs/languages.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/layouts/partials/docs/languages.html b/layouts/partials/docs/languages.html
index 14e0e2c..4020275 100644
--- a/layouts/partials/docs/languages.html
+++ b/layouts/partials/docs/languages.html
@@ -1,7 +1,10 @@
<!-- Merge home and current page translations -->
+{{ $bookTranslatedOnly := default false .Site.Params.BookTranslatedOnly }}
{{ $translations := dict }}
-{{ range .Site.Home.AllTranslations }}
- {{ $translations = merge $translations (dict .Language.Lang .) }}
+{{ if (eq $bookTranslatedOnly false ) }}
+ {{ range .Site.Home.AllTranslations }}
+ {{ $translations = merge $translations (dict .Language.Lang .) }}
+ {{ end }}
{{ end }}
{{ range .Translations }}
{{ $translations = merge $translations (dict .Language.Lang .) }}