Merge commit 'eb16165694f868d73e57b6aed5c26ba5e98229de'

This commit is contained in:
Bjørn Erik Pedersen
2018-12-12 09:06:42 +01:00
199 changed files with 10860 additions and 22630 deletions

View File

@@ -29,17 +29,13 @@ As an example:
Will "fill in the gaps" in the current site with, from left to right, content from the French site, and lastly the English.
A more practical example is to fill in the missing translations for the "minority languages" with content from the main language:
A more practical example is to fill in the missing translations from the other languages:
```bash
{{ $pages := .Site.RegularPages }}
{{ .Scratch.Set "pages" $pages }}
{{ $mainSite := .Sites.First }}
{{ if ne $mainSite .Site }}
{{ .Scratch.Set "pages" ($pages | lang.Merge $mainSite.RegularPages) }}
{{ end }}
{{ $pages := .Scratch.Get "pages" }}
{{ $pages := .Site.RegularPages }}
{{ range .Site.Home.Translations }}
{{ $pages = $pages | lang.Merge .Site.RegularPages }}
{{ end }}
```
{{% note %}}