mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-23 06:28:38 +00:00
Fix .Site.IsServer error in Hugo >= 0.132.0 (#96)
The `.Site.IsServer` no longer works since Hugo v0.132.0. Use `hugo.IsServer` since Hugo v0.120.0 Fixes #94
This commit is contained in:
parent
e4bab35fd1
commit
8b4c646cb0
1 changed files with 7 additions and 1 deletions
|
@ -35,7 +35,13 @@
|
|||
{{- with ((.Site.GetPage "home").OutputFormats.Get "manifest") }}
|
||||
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
|
||||
{{- end }}
|
||||
{{- if not .Site.IsServer }}
|
||||
{{- $server := "" }}
|
||||
{{- if ge (int (index (split hugo.Version ".") 1)) "120" }}
|
||||
{{- $server = hugo.IsServer }}
|
||||
{{- else }}
|
||||
{{- $server = .Site.IsServer }}
|
||||
{{- end }}
|
||||
{{- if not $server -}}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{- end }}
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue