mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00

This is set automatically to "development" when the local server is running, and to "production" when Hugo builds the site.
12 lines
360 B
Text
12 lines
360 B
Text
# 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 }}
|