The following code in the header partial will prevent Google from indexing a Docsy based site unless the HUGO_ENV env variable is set to PRODUCTION.
{{ if eq (getenv “HUGO_ENV”) “production” }}
<META NAME=“ROBOTS” CONTENT=“INDEX, FOLLOW”>
{{ else }}
<META NAME=“ROBOTS” CONTENT=“NOINDEX, NOFOLLOW”>
{{ end }}
I'm deploying my site an AWS bucket and so far as I know the env variable cannot be read (https://stackoverflow.com/questions/36226645/configuring-environment-variables-for-static-web-site-on-aws-s3). So I ended up commenting out those lines of code.
Does anyone have experience deploying to AWS and handling the above?