Browse Source

Favicons (#54)

* Adding support for favicon

* Fixing html tag
tags/1.30
Adam Kaplan 7 years ago
parent
commit
1e37db6cef
3 changed files with 7 additions and 0 deletions
  1. 1
    0
      exampleSite/config.toml
  2. 3
    0
      layouts/_default/baseof.html
  3. 3
    0
      layouts/partials/site-favicon.html

+ 1
- 0
exampleSite/config.toml View File

@@ -17,6 +17,7 @@ enableRobotsTXT = true
filename = "sitemap.xml"

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

+ 3
- 0
layouts/_default/baseof.html View File

@@ -18,6 +18,9 @@
{{ end }}

<link href='{{ "dist/main.css" | absURL }}' rel='stylesheet' type="text/css" />
{{ block "favicon" . }}
{{ partial "site-favicon.html" . }}
{{ end }}

{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />

+ 3
- 0
layouts/partials/site-favicon.html View File

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

Loading…
Cancel
Save