mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Adam Kaplan
27.52.2017 1e37db6cefa9a27372559049afc46918ce39c258
Favicons (#54)

* Adding support for favicon

* Fixing html tag
1 files added
2 files modified
7 ■■■■■ changed files
exampleSite/config.toml 1 ●●●● patch | view | raw | blame | history
layouts/_default/baseof.html 3 ●●●●● patch | view | raw | blame | history
layouts/partials/site-favicon.html 3 ●●●●● patch | view | raw | blame | history
exampleSite/config.toml
@@ -17,6 +17,7 @@
  filename = "sitemap.xml"
[params]
  favicon = ""
  description = "The last theme you'll ever need. Maybe."
  facebook = ""
  twitter = "https://twitter.com/GoHugoIO"
layouts/_default/baseof.html
@@ -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 }}" />
layouts/partials/site-favicon.html
New file
@@ -0,0 +1,3 @@
{{ if .Site.Params.favicon }}
<link rel="shortcut icon" href="/{{ .Site.Params.favicon }}" type="image/x-icon" />
{{ end }}