Browse Source

add site params to env check in head

tags/v1.1
Bud Parr 7 years ago
parent
commit
fa51177f05
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      layouts/_default/baseof.html

+ 2
- 2
layouts/_default/baseof.html View File

<meta name="viewport" content="width=device-width,minimum-scale=1"> <meta name="viewport" content="width=device-width,minimum-scale=1">
{{ .Hugo.Generator }} {{ .Hugo.Generator }}
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}} {{/* 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"> <META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }} {{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{- template "_internal/schema.html" . -}} {{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.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" . }} {{ template "_internal/google_analytics_async.html" . }}
{{ end }} {{ end }}
</head> </head>

Loading…
Cancel
Save