Fix language menu in multihost setting
#196 added the flexibility to index.html to be used in subdirectories. Unfortunately this broke the language menu in multihost settings. Both functionalities are made to work now by checking the `hugo.IsMultihost` condition. This makes the code somewhat harder to read, but at least ensures that the regression is fixed. Fixes: #214 Signed-off-by: Daniel Holbach <daniel.holbach@gmail.com>
This commit is contained in:
parent
d326aa747e
commit
811e1f2b54
2 changed files with 26 additions and 7 deletions
|
|
@ -3,7 +3,11 @@
|
|||
<article class="post page">
|
||||
<header class="post-header">
|
||||
{{ with .Parent }}
|
||||
{{ if hugo.IsMultihost }}
|
||||
<a id="back-to-main-page" href="{{ .RelPermalink | relLangURL }}"><i class="fa fa-chevron-left" aria-hidden="true"></i> {{ or .Title .Site.Title }}</a>
|
||||
{{ else }}
|
||||
<a id="back-to-main-page" href="{{ .RelPermalink | relLangURL }}"><i class="fa fa-chevron-left" aria-hidden="true"></i> {{ or .Title .Site.Title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</header>
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue