diff options
Diffstat (limited to 'layouts/partials/head')
-rw-r--r-- | layouts/partials/head/colorScheme.html | 4 | ||||
-rw-r--r-- | layouts/partials/head/head.html | 7 | ||||
-rw-r--r-- | layouts/partials/head/opengraph/provider/twitter.html | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/layouts/partials/head/colorScheme.html b/layouts/partials/head/colorScheme.html index 42f4dd8..04d63a5 100644 --- a/layouts/partials/head/colorScheme.html +++ b/layouts/partials/head/colorScheme.html @@ -1,5 +1,5 @@ -{{- $defaultColorScheme := default "auto" .Site.Params.colorScheme.default -}} -{{- if not (default false .Site.Params.colorScheme.toggle) -}} +{{- $defaultColorScheme := .Site.Params.colorScheme.default -}} +{{- if not .Site.Params.colorScheme.toggle -}} {{/* If toggle is disabled, force default scheme */}} <script> (function() { diff --git a/layouts/partials/head/head.html b/layouts/partials/head/head.html index be63710..5de6071 100644 --- a/layouts/partials/head/head.html +++ b/layouts/partials/head/head.html @@ -19,7 +19,12 @@ {{- end -}} {{ with .Site.Params.favicon }} - <link rel="shortcut icon" href="{{ . }}" /> + {{ $favicon := resources.Get . }} + {{ if $favicon }} + <link rel="shortcut icon" href="{{ $favicon.RelPermalink }}" /> + {{ else }} + {{ errorf "Failed loading favicon from %q" . }} + {{ end }} {{ end }} {{- template "_internal/google_analytics.html" . -}} diff --git a/layouts/partials/head/opengraph/provider/twitter.html b/layouts/partials/head/opengraph/provider/twitter.html index 03bbf22..a837ba3 100644 --- a/layouts/partials/head/opengraph/provider/twitter.html +++ b/layouts/partials/head/opengraph/provider/twitter.html @@ -11,6 +11,6 @@ {{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}} {{- if $image.exists -}} - <meta name="twitter:card" content="{{ default `summary_large_image` .Site.Params.opengraph.twitter.card }}"> + <meta name="twitter:card" content="{{ .Site.Params.opengraph.twitter.card }}"> <meta name="twitter:image" content='{{ absURL $image.permalink }}' /> {{- end -}}
\ No newline at end of file |