mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
SetThemeAuto: disable auto theme set by default
- user needs to add + params: SetThemeAuto: true
This commit is contained in:
parent
8a0783adfb
commit
338027b046
@ -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>
|
||||
|
@ -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>
|
||||
<script src="{{ $settheme.Permalink }}"></script>
|
||||
{{- end -}}
|
Loading…
Reference in New Issue
Block a user