add site params to env check in head

This commit is contained in:
Bud Parr 2017-04-15 10:12:59 -04:00
parent 24618eca67
commit fa51177f05
No known key found for this signature in database
GPG Key ID: ACA375160539D2B3
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
<meta name="viewport" content="width=device-width,minimum-scale=1">
{{ .Hugo.Generator }}
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" }}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
@ -25,7 +25,7 @@
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" }}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
</head>