aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-11-14 00:23:01 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-11-16 20:35:23 +0100
commit13584878c23146c7093c8d1b9150ff9a98d28c8b (patch)
treecc3aabd06040a8879a27881e62afa3ec52e85392 /layouts/partials
parent7b52bf423214194ab39392db6e9bc2de9d36a02d (diff)
Polish multilang mode, update docs
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/docs/footer.html4
-rw-r--r--layouts/partials/docs/html-head.html3
2 files changed, 4 insertions, 3 deletions
diff --git a/layouts/partials/docs/footer.html b/layouts/partials/docs/footer.html
index 15d1640..ac05ae7 100644
--- a/layouts/partials/docs/footer.html
+++ b/layouts/partials/docs/footer.html
@@ -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 }}
diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html
index c3a692f..153ab35 100644
--- a/layouts/partials/docs/html-head.html
+++ b/layouts/partials/docs/html-head.html
@@ -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 }}