Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zwbetz-gh/minimal-bootstrap-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Betz <zwbetz@gmail.com>2019-01-27 22:56:26 +0300
committerZachary Betz <zwbetz@gmail.com>2019-01-27 22:56:26 +0300
commitc0349388664baa13f2fd419efbdc6dd971466ad9 (patch)
tree07cbcdd7200e7c0121a0fbbfdcddeaf7eb580642
parent970f8d0bcdb2763f310f25d14f595768edacc2a6 (diff)
parent2f111a2a120870bf89b69934c0617966e393a806 (diff)
Merge branch 'master' of github.com:zwbetz-gh/minimal-bootstrap-hugo-theme
-rw-r--r--layouts/index.html7
-rw-r--r--layouts/partials/head.html7
2 files changed, 12 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 7043173..8b71150 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,11 @@
{{- define "main" -}}
-{{ $homepage := "" }}{{ range first 1 .Site.Menus.nav }}{{ $homepage = .Name }}{{ end }}
+{{ $homepage := "" }}
+{{ with .Site.Menus.nav }}
+ {{ range first 1 . }}
+ {{ $homepage = .Name }}
+ {{ end }}
+{{ end }}
<h1>{{ $homepage }}</h1>
{{ partial "post-list" . }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 5b0d2fd..49e1619 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -31,7 +31,12 @@
<link rel="stylesheet" href="{{ $bootstrapCss | absURL }}" />
{{ if .IsHome }}
- {{ $homepage := "" }}{{ range first 1 .Site.Menus.nav }}{{ $homepage = .Name }}{{ end }}
+ {{ $homepage := "" }}
+ {{ with .Site.Menus.nav }}
+ {{ range first 1 . }}
+ {{ $homepage = .Name }}
+ {{ end }}
+ {{ end }}
<title>{{ $homepage }} | {{ .Site.Title }}</title>
{{ else }}
<title>{{ .Title }} | {{ .Site.Title }}</title>