mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
b8ffcdf9a4
This is set automatically to "development" when the local server is running, and to "production" when Hugo builds the site.
13 lines
360 B
Plaintext
13 lines
360 B
Plaintext
# www.robotstxt.org
|
|
|
|
{{- $isProduction := eq hugo.Environment "production" -}}
|
|
{{- $isNetlify := eq (getenv "NETLIFY") "true" -}}
|
|
{{- $allowCrawling := and (not $isNetlify) $isProduction -}}
|
|
|
|
{{ if $allowCrawling }}
|
|
# Allow crawling of all content
|
|
{{- end }}
|
|
User-agent: *
|
|
Disallow:{{ if not $allowCrawling }} /{{ end }}
|
|
Sitemap: {{ "/sitemap.xml" | absURL }}
|