refactor: remove some usages of default in template
No longer needed thanks to Hugo's configuration merge
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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 -}}
|
||||
Reference in New Issue
Block a user