Prefer existing and translated variant of home page (#342)

* Prefer existing and translated variant of home page as the site link in the menu header.
* More compact "cond"-version of fix.
This commit is contained in:
Nikolay Raspopov 2021-05-20 23:02:31 +03:00 committed by GitHub
parent 553d378db3
commit 345cb5d947
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
<h2 class="book-brand">
<a href="{{ .Site.BaseURL | relLangURL }}">
<a href="{{ cond (not .Site.Home.File) .Sites.First.Home.RelPermalink .Site.Home.RelPermalink }}">
{{- with .Site.Params.BookLogo -}}
<img src="{{ . | relURL }}" alt="Logo" />
{{- end -}}