Mark live site in HTML

This allows CSS, JavaScript etc to detect if the served website is the
live one.
pull/31377/head
Tim Bannister 2021-12-07 17:51:34 +00:00
parent 61214a707c
commit d6f7243168
No known key found for this signature in database
GPG Key ID: 1E76582C4F66FA48
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="{{.Params.class}} no-js">
<head>
{{- if eq hugo.Environment "preview" -}}
<!-- deploy preview -->
{{- end -}}
<head {{- if hugo.IsProduction -}}class="live-site"{{- end -}}>
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}{{- if ne .Params.cid "" -}}{{- printf " cid-%s" (lower .Params.cid) -}}{{- end -}}">