aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-09-16 17:49:53 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-09-16 17:49:53 +0800
commitfba1d6b9c5bc72745368f63c67c027dd0070cb6b (patch)
tree621c698665bf72c0a841fb8f87f320a49c702d85
parent2b282fc57ccab11ad41c857450f4e87e42e47f38 (diff)
feat: config logo title
-rw-r--r--exampleSite/config.toml7
-rw-r--r--layouts/partials/header.html8
-rw-r--r--layouts/partials/slideout.html8
3 files changed, 18 insertions, 5 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 71e8c06..3ac1178 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,7 +1,7 @@
baseURL = "http://localhost:1313/"
languageCode = "en"
defaultContentLanguage = "en"
-title = "Even"
+title = "Even - A super concise theme for Hugo"
enableRobotsTXT = true
enableEmoji = true
theme = "even"
@@ -42,9 +42,10 @@ copyright = "" # default: author.name ↓ # 默认为下面配
url = "/categories/"
[params]
- since = "2017" # Site creation time # 站点建立时间
-
+ since = "2017" # Site creation time # 站点建立时间
+
# site info (option) # 站点信息(可选)
+ logoTitle = "Even" # default: the title value # 默认值: 上面设置的title值
keywords = ["Hugo", "theme","even"]
description = "Hugo theme even example site."
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index d81055e..57cf431 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,5 +1,11 @@
<div class="logo-wrapper">
- <a href="{{ "/" | relURL }}" class="logo">{{ .Site.Title }}</a>
+ <a href="{{ "/" | relURL }}" class="logo">
+ {{- if .Site.Params.logoTitle -}}
+ {{ .Site.Params.logoTitle }}
+ {{- else -}}
+ {{ .Site.Title }}
+ {{- end -}}
+ </a>
</div>
<nav class="site-navbar">
diff --git a/layouts/partials/slideout.html b/layouts/partials/slideout.html
index 21de3cb..e8cebd3 100644
--- a/layouts/partials/slideout.html
+++ b/layouts/partials/slideout.html
@@ -1,6 +1,12 @@
<div id="mobile-navbar" class="mobile-navbar">
<div class="mobile-header-logo">
- <a href="{{ "/" | relURL }}" class="logo">{{ .Site.Title }}</a>
+ <a href="{{ "/" | relURL }}" class="logo">
+ {{- if .Site.Params.logoTitle -}}
+ {{ .Site.Params.logoTitle }}
+ {{- else -}}
+ {{ .Site.Title }}
+ {{- end -}}
+ </a>
</div>
<div class="mobile-navbar-icon">
<span></span>