mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-30 08:39:56 +02:00
Use hugo.Environment
instead of getenv
(#29240)
This is set automatically to "development" when the local server is running, and to "production" when Hugo builds the site.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# www.robotstxt.org
|
||||
|
||||
{{- $isProduction := eq (getenv "HUGO_ENV") "production" -}}
|
||||
{{- $isProduction := eq hugo.Environment "production" -}}
|
||||
{{- $isNetlify := eq (getenv "NETLIFY") "true" -}}
|
||||
{{- $allowCrawling := and (not $isNetlify) $isProduction -}}
|
||||
|
||||
|
Reference in New Issue
Block a user