Polish multilang mode, update docs

This commit is contained in:
Alex Shpak
2019-11-14 00:23:01 +01:00
parent 7b52bf4232
commit 13584878c2
14 changed files with 32 additions and 27 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
{{ if or .GitInfo .Site.Params.BookEditPath }}
<div class="book-footer {{ if not .GitInfo }}justify-end{{ else }}justify-between{{ end }}">
<div class="book-footer justify-between">
{{ partial "docs/languages" . }}
{{ with .GitInfo }}
<div>
@@ -14,7 +14,7 @@
<div>
{{ if $.File }}
<a class="flex align-center" href="{{ $.Site.Params.BookRepo }}/{{ . }}/{{ $.File.Path }}" target="_blank" rel="noopener">
<img src="{{ "svg/edit.svg" | relURL }}" alt="Edit" />
<img src="{{ "svg/edit.svg" | relURL }}" alt="{{ i18n "Edit this page" }}" />
<span>{{ i18n "Edit this page" }}</span>
</a>
{{ end }}
+2 -1
View File
@@ -10,7 +10,8 @@
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}">
{{ if default true .Site.Params.BookSearch }}
{{- $searchJSFile := printf "%s.%s" .Language.Lang "search.js" -}}
{{- .Scratch.Set "bookSearchConfig" (i18n "bookSearchConfig") -}}} <!-- Remove after https://github.com/gohugoio/hugo/issues/6331 -->
{{- $searchJSFile := printf "%s.search.js" .Language.Lang -}}
{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }}
<script defer src="{{ $searchJS.RelPermalink }}" integrity="{{ $searchJS.Data.Integrity }}"></script>
{{ end }}