diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/head.html | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e437156..55a2077 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -17,9 +17,22 @@ <link rel="apple-touch-icon" sizes="180x180" href="{{ urls.JoinPath $faviconPath "apple-touch-icon.png" }}"> {{ end }} -{{ with .OutputFormats.Get "rss" -}} -{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} -{{ end }} +{{- define "outputFormats" -}} + {{- range .OutputFormats }} + {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{- end }} +{{- end -}} + +{{ if .IsHome -}} + {{ with .Site.GetPage (site.Params.homeCollection | default "") -}} + {{ template "outputFormats" . }} + {{ end }} +{{ else -}} + {{ template "outputFormats" . }} + {{ with .Parent -}} + {{ template "outputFormats" . }} + {{- end }} +{{- end }} {{- if .IsHome -}} <meta name="description" content="{{ site.Params.Description }}"/> |