summaryrefslogtreecommitdiffstats
path: root/site/layouts/robots.txt
blob: 271b4f1b7b4275649d408879edca9723c10621b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# 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 }}