浏览代码

Add site logo option

81-site-logo
mountainbug95 4 年前
父节点
当前提交
91547594d8
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 1
    0
      exampleSite/config.toml
  2. 5
    1
      layouts/partials/site-navigation.html

+ 1
- 0
exampleSite/config.toml 查看文件

@@ -18,6 +18,7 @@ enableRobotsTXT = true

[params]
favicon = ""
site_logo = ""
description = "The last theme you'll ever need. Maybe."
facebook = ""
twitter = "https://twitter.com/GoHugoIO"

+ 5
- 1
layouts/partials/site-navigation.html 查看文件

@@ -1,7 +1,11 @@
<nav class="pv3 ph3 ph4-ns" role="navigation">
<div class="flex-l justify-between items-center center">
<a href="{{ .Site.Home.RelPermalink }}" class="f3 fw2 hover-white no-underline white-90 dib">
{{ .Site.Title }}
{{ with .Site.Params.site_logo }}
<img src="{{ . }}" class="w100 mw5-ns" alt="{{ $.Site.Title }}" />
{{ else }}
{{ .Site.Title }}
{{ end }}
</a>
<div class="flex-l items-center">
{{ partial "i18nlist.html" . }}

正在加载...
取消
保存