Mark live site in HTML
This allows CSS, JavaScript etc to detect if the served website is the live one.
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="{{ .Site.Language.Lang }}" class="{{.Params.class}} no-js">
|
<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" . }}
|
{{ partial "head.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body class="td-{{ .Kind }}{{- if ne .Params.cid "" -}}{{- printf " cid-%s" (lower .Params.cid) -}}{{- end -}}">
|
<body class="td-{{ .Kind }}{{- if ne .Params.cid "" -}}{{- printf " cid-%s" (lower .Params.cid) -}}{{- end -}}">
|
||||||
|
|||||||
Reference in New Issue
Block a user