mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-09 01:32:45 +00:00
The Ananke theme got environment support before Hugo did and when Hugo added it in version 0.53 it was in a slightly different way. Running "hugo server" will set the environment to "development" and running just "hugo" will set it to "production". It can be overridden by OS environment variable "HUGO_ENVIRONMENT" (note, not "HUGO_ENV") or by using the --environment option. Use "hugo.Environment" to detect environment instead and update the README.
8 lines
181 B
Plaintext
8 lines
181 B
Plaintext
User-agent: *
|
|
# robotstxt.org - if environment is not production robots will be disallowed.
|
|
{{ if eq hugo.Environment "production" }}
|
|
Disallow:
|
|
{{ else }}
|
|
Disallow: /
|
|
{{ end }}
|