2019-01-08 16:33:28 +00:00
|
|
|
# www.robotstxt.org
|
|
|
|
|
2019-08-02 14:26:25 +00:00
|
|
|
{{- $isProduction := eq (getenv "HUGO_ENV") "production" -}}
|
|
|
|
{{- $isNetlify := eq (getenv "NETLIFY") "true" -}}
|
|
|
|
{{- $allowCrawling := and (not $isNetlify) $isProduction -}}
|
|
|
|
|
|
|
|
{{ if $allowCrawling }}
|
2019-01-08 16:33:28 +00:00
|
|
|
# Allow crawling of all content
|
|
|
|
{{- end }}
|
|
|
|
User-agent: *
|
2019-08-02 14:26:25 +00:00
|
|
|
Disallow:{{ if not $allowCrawling }} /{{ end }}
|
2019-01-08 16:33:28 +00:00
|
|
|
Sitemap: {{ .Site.BaseURL }}/sitemap.xml
|