From c828c6660f32da34e118fad039bc01602ba0251a Mon Sep 17 00:00:00 2001 From: Alex Ivanov Date: Thu, 21 Jan 2021 13:42:26 +0300 Subject: Add OnlyTranslated property (#303) * Add OnlyTranslated property Signed-off-by: Alex Ivanov * Add newlines Signed-off-by: Alex Ivanov * rename property Signed-off-by: Alex Ivanov --- layouts/partials/docs/languages.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'layouts/partials/docs') 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 @@ +{{ $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 .) }} -- cgit v1.2.3