Favicons (#54)

* Adding support for favicon

* Fixing html tag
This commit is contained in:
Adam Kaplan 2017-09-27 07:52:26 -04:00 committed by Bud Parr
parent be9acde3f4
commit 1e37db6cef
3 changed files with 7 additions and 0 deletions

View file

@ -17,6 +17,7 @@ enableRobotsTXT = true
filename = "sitemap.xml" filename = "sitemap.xml"
[params] [params]
favicon = ""
description = "The last theme you'll ever need. Maybe." description = "The last theme you'll ever need. Maybe."
facebook = "" facebook = ""
twitter = "https://twitter.com/GoHugoIO" twitter = "https://twitter.com/GoHugoIO"

View file

@ -18,6 +18,9 @@
{{ end }} {{ end }}
<link href='{{ "dist/main.css" | absURL }}' rel='stylesheet' type="text/css" /> <link href='{{ "dist/main.css" | absURL }}' rel='stylesheet' type="text/css" />
{{ block "favicon" . }}
{{ partial "site-favicon.html" . }}
{{ end }}
{{ if .RSSLink }} {{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />

View file

@ -0,0 +1,3 @@
{{ if .Site.Params.favicon }}
<link rel="shortcut icon" href="/{{ .Site.Params.favicon }}" type="image/x-icon" />
{{ end }}