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

github.com/ertuil/erblog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutong Chen <ertuil98@foxmail.com>2020-03-22 04:04:37 +0300
committerGitHub <noreply@github.com>2020-03-22 04:04:37 +0300
commitbb19c432c2df52a795df953788694817d320105d (patch)
treebe74232e167eb2926ab77f26167a8dccfbf6011f
parent11c98e11df5bc4332f6a308f51ace88ee9564fd4 (diff)
parentebf132a54aaa63584252204f271cfea0e1fb3d69 (diff)
Merge pull request #9 from stipx/master
Do not show title twice on home-page
-rw-r--r--layouts/partials/head.html4
-rw-r--r--layouts/partials/nav.html6
2 files changed, 6 insertions, 4 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 5da22de..737ad40 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -2,7 +2,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <title>{{ .Site.Title }}{{if.Title}} - {{.Title}} {{end}}</title>
+ <title>{{ .Site.Title }}{{if and (not .IsHome) (.Title)}} - {{.Title}} {{end}}</title>
{{if .Params.tags}}
@@ -50,4 +50,4 @@
<script src="/self/js/lazysizes.min.js" async></script>
{{- partial "self-define-head.html" -}}
-</head> \ No newline at end of file
+</head>
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index c9b4a6a..d3c102f 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -31,8 +31,10 @@
<dd><a href="/post/">Posts</a></dd>
<!--<dd><a href="/gallery/">Gallery</a></dd>-->
- {{ range sort .Site.Menus.main }}
- <dd><a href="{{ .URL }}">{{ .Name }}</a></dd>
+ {{ if .Site.Menus.main }}
+ {{ range sort .Site.Menus.main }}
+ <dd><a href="{{ .URL }}">{{ .Name }}</a></dd>
+ {{ end }}
{{ end }}
</dl>
</li>