feat: config logo title

This commit is contained in:
olOwOlo 2017-09-16 17:49:53 +08:00
parent 2b282fc57c
commit fba1d6b9c5
No known key found for this signature in database
GPG key ID: 456394B6E7A15EA6
3 changed files with 18 additions and 5 deletions

View file

@ -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"
@ -45,6 +45,7 @@ copyright = "" # default: author.name ↓ # 默认为下面配
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."

View file

@ -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">

View file

@ -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>