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>
This commit is contained in:
@@ -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 .) }}
|
||||
|
||||
Reference in New Issue
Block a user