diff options
| -rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
| -rw-r--r-- | layouts/partials/head.html | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 4035dd6..e243b57 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -6,9 +6,11 @@ </head> <body class="{{ if eq .Kind `page` }}single{{ else }}list{{ if .IsHome }} home{{ end }}{{ end }}"> + {{- if $.Site.Params.SetThemeAuto -}} <script> setTheme(); </script> + {{- end -}} <header class="header"> {{- partial "header.html" . }} </header> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 91687be..4b03bd0 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -32,5 +32,7 @@ {{- template "_internal/opengraph.html" . }} {{- end }} <!-- Script --> +{{- if $.Site.Params.SetThemeAuto -}} {{ $settheme := resources.Get "set-theme.js" | minify }} -<script src="{{ $settheme.Permalink }}"></script>
\ No newline at end of file +<script src="{{ $settheme.Permalink }}"></script> +{{- end -}}
\ No newline at end of file |
