gohugo-theme-bree/layouts/robots.txt
2022-05-29 11:16:13 +02:00

12 lines
330 B
Text

{{- $url := urls.Parse ("/" | absURL) -}}
# robots.txt file for "{{ site.Title }}" website, {{ $url.Host }}
User-agent: *
{{- if eq (getenv "HUGO_ENV") "production" | or (eq site.Params.env "production") }}
Allow: /
Disallow: /404.html
Disallow: /thanks
Sitemap: {{ "/sitemap.xml" | absURL }}
{{- else }}
Disallow: /
{{- end }}