You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<METANAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<METANAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
Google reports the site isn't being indexed. Hugo is being run in production mode.
Each generated page contains
but shouldn't in a production build.
Investigation
Looking at layouts/partials/head.html @ lines 6-11:
Per https://gohugo.io/functions/hugo/environment/ the
hugo
command builds with a production environment, but the theme isn't detecting this.Solution
Use
Hugo.IsProduction
in the environment check instead.The text was updated successfully, but these errors were encountered: