{{ $home := .Site.Home }}
-
{{ i18n "languages" }}
-
{{ range $.Site.Home.AllTranslations }}
{{ $isCurrentLang := eq $home.Language .Language }}
- {{ if $isCurrentLang }}✓{{ end }}{{ .Language.LanguageName }} {{ end }}
{{ i18n "books" }} - {{ $home.Language }}
+{{ i18n "books" }} - {{ $home.Language.LanguageName }}
{{ $books := slice}} {{ range where .Site.Pages "Section" "books" }} - {{ with .File }} - {{ $subDirsNumer := .File.Path | strings.Count "/" }} - {{ if eq $subDirsNumer 2 }} - {{ $books = $books | append (dict "page" . "path" .File.Path) }} - {{ end }} + {{ $subDirsNumer := .File.Path | strings.Count "/" }} + {{ if eq $subDirsNumer 2 }} + {{ $books = $books | append (dict "page" . "path" .File.Path) }} {{ end }} {{ end }}-
{{ range sort $books "path" }}
{{ if in .path "_index.adoc" }}
{{ $bookPath := replaceRE "/_index.adoc" "" .path }}
{{ $bookName := replaceRE "books/" "" $bookPath }}
-
- {{ $bookName }} +
- {{ .page.Title }} {{ end }} {{ end }}
{{ i18n "articles" }} - {{ $home.Language }}
+{{ i18n "articles" }} - {{ $home.Language.LanguageName }}
{{ $articles := slice}} {{ range where .Site.Pages "Section" "articles" }} - {{ with .File }} - {{ $subDirsNumer := .File.Path | strings.Count "/" }} - {{ if eq $subDirsNumer 2 }} - {{ $articles = $articles | append (dict "page" . "path" .File.Path) }} - {{ end }} + {{ $subDirsNumer := .File.Path | strings.Count "/" }} + {{ if eq $subDirsNumer 2 }} + {{ $articles = $articles | append (dict "page" . "path" .File.Path) }} {{ end }} {{ end }}-
{{ range sort $articles "path" }}
{{ if in .path "_index.adoc" }}
{{ $articlePath := replaceRE "/_index.adoc" "" .path }}
{{ $articleName := replaceRE "articles/" "" $articlePath }}
-
- {{ $articleName }} +
- {{ .page.Title }} {{ end }} {{ end }}